Top "Preventdefault" questions

Javascript event method to cancel the event if it is cancelable, without stopping further propagation of the event.

jQuery trigger() and stopPropagation() on keydown event

I am having a difficult time with keydown and stop propagation i do not want my page to refresh, i …

jquery jquery-ui keydown preventdefault stoppropagation
HTML Anchor tag redirect link after ajax request

I'm trying to write a method to catch user clicks on a site menu, but I want the process to …

jquery html ajax anchor preventdefault
IE Error with e.preventDefault

I apologise in advance if this has already been covered but I’m new to this, I have seen there …

javascript internet-explorer preventdefault
ReactJS - Cannot read property 'preventDefault' of undefined

Trying to do a simple onClick event/function, in ReactJS. When the button is clicked, I want to run a …

javascript reactjs function onclick preventdefault
how to prevent default on keypress for certain event but then bring back the default again

I have been working on something that requires me to use the space bar to trigger an event. The thing …

javascript jquery html keydown preventdefault
Prevent JQuery Mobile swipe event over specific element

I am using jquery mobile and I need to prevent swipe event over specific element. Need of doing this is …

jquery-mobile jquery swipe preventdefault
`return false` in an event handler attached by addEventListener or element.on*

Right let’s get this out the way first. Yes, I want to hide the context menu. No, I’m …

javascript dom-events addeventlistener preventdefault
Prevent browser pop on taphold event

In a jquery-mobile based web app, how do i prevent the default browser menu from showing on "tap hold" .. instead …

jquery jquery-mobile preventdefault
Prevent default event for jQuery keydown in Firefox

I have jQuery code which makes an array of focusable elements and binds .keydown for the left and right arrows …

jquery firefox event-handling preventdefault
Select2 4.0.0 AJAX - Choose highlighted option with Tab

I'm fetching user IDs and names via AJAX and using Select2 to search through them, but my users have requested …

jquery ajax preventdefault jquery-select2-4