question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method for only disabling the click listener's preventDefault()

See original GitHub issue

Thank you for #123.

But having the new option affect all events goes a little far for my use case. Now if I set preventMouseEventsDefault: false, I scroll the screen when trying to pan via touch or zoom with the mousewheel.

Is there a way to prevent this?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

MidnightDesigncommented, Nov 12, 2015

Basically, yes. If you prevent everything, panning on mobile and zooming with the mousewheel don’t work anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event.preventDefault() - Web APIs | MDN
The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default ...
Read more >
Method for only disabling the click listener's preventDefault()
I've set preventMouseEventsDefault: false for my click listener to work. Now if you try to zoom using the mousewheel, the page obviously scrolls ......
Read more >
How to unbind a listener that is calling event.preventDefault ...
In my case: $('#some_link').click(function(event){ event.preventDefault(); });. $('#some_link').unbind('click'); worked as the only method ...
Read more >
event.preventDefault() | jQuery API Documentation
preventDefault(). This method does not accept any arguments. For example, clicked anchors will not take the browser to a new URL. We can...
Read more >
How to correctly use preventDefault(), stopPropagation(), or ...
Now we see that not only does the click event not bubble up the DOM, but by removing the preventDefault method call the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found