File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,10 @@ let%shared make
387387 then Stopped (* swiping in wrong direction (vertical/horizontal) *)
388388 else
389389 if abs move > Ot_swipe. threshold
390- then begin
390+ then begin (* We decide to take the event *)
391+ (* We send a touchcancel to the parent
392+ (which received the start) *)
393+ Ot_swipe. dispatch_event ~ev d2' " touchcancel" (clX ev) (clY ev);
391394 Manip.Class. add ~% d2 ot_swiping;
392395 set_top_margin () ;
393396 remove_transition d2';
Original file line number Diff line number Diff line change @@ -31,3 +31,7 @@ val bind:
3131val clX : Dom_html .touchEvent Js .t -> int
3232val clY : Dom_html .touchEvent Js .t -> int
3333val threshold : int
34+ val dispatch_event :
35+ ev :Dom_html .touchEvent Js .t ->
36+ Dom_html .element Js .t ->
37+ string -> int -> int -> unit
You can’t perform that action at this time.
0 commit comments