This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Touchend (and vmouseup) are not propagated if $.event.special.tap.emitTapOnTaphold is set to false (fixes #5983) #6719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, touchend events (and possibly others) are stopped by code handling the "no tap on taphold" feature (#5983). This means that if one wants to detect touchend after a taphold then this is virtually impossible because the propagation is being stopped via
event.stopPropagation()
. The intent of this call (as described by commit #49bb033) is to prevent default action upon tap on an anchor element.This pull request fixes the problem by calling
event.preventDefault()
instead ofevent.stopPropagation()
. This allows touchend (and associated vmouseup) to bubble up and at the same time prevents default action on target element.