The MDN documentation says
The
preventDefault()
method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.
But, even if I add a listener and thereby explicitly handle the event, preventDefault()
still prevents the default handling, even though the documentation specifically says it prevents the default if the event isn’t handled.
It appears it prevents the default handling regardless of whether the event is explicitly handled.