Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #220 - Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. #221

Closed
wants to merge 2 commits into from

Conversation

Rezyan
Copy link

@Rezyan Rezyan commented Mar 31, 2022

Hi,

This PR is intended to fix the issue #220. You can have a look at the documentation of the Event.cancelable property:

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.

Regards.

@Rezyan Rezyan changed the title Fix desandro/draggabilly#220 Fix #220 - Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. Mar 31, 2022
@Rezyan Rezyan closed this Mar 1, 2023
@Rezyan Rezyan reopened this Mar 1, 2023
@Rezyan Rezyan closed this by deleting the head repository Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant