In JavaScript, how can I check if an event (e.g. keypress) was e.preventDefault() using e.preventDefault() ? I do not use jQuery.
e.preventDefault()
You can check the event object's defaultPrevented property (which is a boolean indicating when preventDefault was ever called for this particular event object).
defaultPrevented
preventDefault