jargon

Frontend & browser·JavaScript in the browser

you stopped the form from navigating away but the parent's handler still ran.

preventDefault

Also calledprevent default action

Cancelling the browser's built-in response to an event — following a link, submitting a form, scrolling on a wheel event — without affecting propagation at all. It is routinely confused with stopping propagation because both are called in the same handler, but they do unrelated things. It has no effect on a non-cancelable event, and none at all on a passive listener.

Commonly confused with