File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -575,6 +575,13 @@ touching finger.
575575</script>
576576```
577577
578+ {{index "preventDefault method"}}
579+
580+ You'll usually want to call ` preventDefault ` in touch event handlers,
581+ to override the browser's default behavior (which may include
582+ scrolling the page on swiping) and to prevent the mouse events from
583+ being fired, for which you may also have registered a handler.
584+
578585## Scroll events
579586
580587{{index scrolling, "scroll event", "event handling"}}
@@ -929,7 +936,8 @@ prevent the browser's default handling of the event
929936
930937Pressing a key fires ` "keydown" ` and ` "keyup" ` events. Pressing a
931938mouse button fires ` "mousedown" ` , ` "mouseup" ` , and ` "click" ` events.
932- Moving the mouse fires ` "mousemove" ` events.
939+ Moving the mouse fires ` "mousemove" ` events. Touchscreen interaction
940+ will result in ` "touchstart" ` , ` "touchmove" ` , and ` "touchend" ` events.
933941
934942Scrolling can be detected with the ` "scroll" ` event, and focus changes
935943can be detected with the ` "focus" ` and ` "blur" ` events. When the
You can’t perform that action at this time.
0 commit comments