In JavaScript, the mousedown event fires when a pointing-device button is pressed while the pointer is inside the element (MDN). It fires at the moment of press — before release — unlike click. The event type is a MouseEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Filter left button.button === 0 ignores middle/right.
End on mouseup. Release completes the pair.
Use case. Drag start, press-and-hold, custom scrubbers.
Compatibility
Browser Support
Element mousedown is Baseline Widely available (MDN: since July 2015). Safe for press/drag mouse UX in modern and older evergreen browsers.
✓ Baseline · Widely available
Element mousedown
MouseEvent when a pointing-device button is pressed — long-established across browsers.
99%Widely available
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
Android WebViewSupported · Modern WebView
Full support
mousedownBaseline
Bottom line: Use mousedown for press/drag start. Prefer click for primary activate actions, and pointerdown when you need touch/pen too.
Frequently Asked Questions
It fires when a pointing-device button is pressed while the pointer is inside the element (MDN). Unlike click, it fires at the moment of press — before release.
No. MDN marks Element mousedown as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
A MouseEvent. Useful fields include button, buttons, clientX, clientY, and modifier keys such as ctrlKey and shiftKey.
mousedown fires when the button goes down. click fires after a full press-and-release inside the same element. Prefer click for primary UI actions so keyboard activation is included.
With a physical mouse, mousedown fires for every button press. pointerdown fires only for the first button press; extra buttons held at the same time do not fire more pointerdown events (MDN).
Use it for press feedback, drag start, press-and-hold, or when you need the button identity immediately. Keep primary activate-on-click actions on click.