Fix #220 - Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. #221
The cancelable read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
If the event is not cancelable, then its cancelable property will be false and the event listener cannot stop the event from occurring.
Most browser-native events that can be canceled are the ones that result from the user interacting with the page. Canceling the click, wheel, or beforeunload events would prevent the user from clicking on something, scrolling the page with the mouse wheel, or navigating away from the page, respectively.
Synthetic events created by other JavaScript code define if they can be canceled when they are created.
To cancel an event, call the preventDefault() method on the event. This keeps the implementation from executing the default action that is associated with the event.
Event listeners that handle multiple kinds of events may want to check cancelable before invoking their preventDefault() methods.
This part is important in our case:
Event listeners that handle multiple kinds of events may want to check cancelable before invoking their preventDefault() methods.
Furthermore, I have improved the dist script to support the Windows OS, since some developers are not necessarily on Linux: ec8a2fa.
Hi,
This PR is intended to fix the issue https://github.com/desandro/draggabilly/issues/220. You can have a look at the documentation of the
Event.cancelable
property:This part is important in our case:
Furthermore, I have improved the
dist
script to support the Windows OS, since some developers are not necessarily on Linux:ec8a2fa
.Regards.