unidragger
unidragger copied to clipboard
Adding the ability to configure event listener options, restoring ability to prevent preventDefault() in pointerDown
Follow-up from PR to Unipointer: https://github.com/metafizzy/unipointer/pull/8
Same reasoning around the need for adding listenerOpts
applies.
I'm also hoping you reconsider leaving the ability to prevent event.preventDefault()
in pointerDown, without actually quitting the event chain via this.okayPointerDown()
. The main reason for allowing the event chain to continue without event.preventDefault()
is to allow inner elements with 'click'
handlers a chance to fire. Prevent default in touchstart
stops the chain and prevents these events from firing. The structure I've outlined would make this behavior opt-in, leaving the always preventing behavior the default.
Also included a minor fix in the README, which was referencing an internal property that was removed.