The mousedown event fires when a pointing-device button is pressed inside an element. Learn addEventListener vs onmousedown, button / buttons, how it differs from click and pointerdown, press-and-hold patterns, and five try-it labs.
01
Kind
Instance event
02
Type
MouseEvent
03
When
Button pressed
04
Handler
onmousedown
05
Pair
mouseup
06
Status
Baseline widely available
Fundamentals
Introduction
mousedown answers: “Did the user just press a pointing-device button while the pointer was over this element?” It fires the moment the button goes down—not after release.
That is different from click, which waits for a full press and release inside the same element. Use mousedown for drag start, press feedback, or press-and-hold. Prefer click for primary UI actions so keyboard users are included.
💡
Beginner tip
With a physical mouse, mousedown fires for every button press. pointerdown fires only for the first button; later buttons held at the same time do not fire more pointerdown events.
Concept
Understanding mousedown
An instance event that answers: “Was a pointing-device button just pressed here?”
Fires when a button is pressed while the pointer is inside the element.
mousedown is marked Baseline Widely available on MDN (since July 2015). Logos use the shared browser-image-sprite.png sprite from this project. MouseEvent button/buttons and coordinates are supported across modern engines.
✓ Baseline · Widely available
Element mousedown
Fires when a pointing-device button is pressed; pair with mouseup and prefer click for primary actions.
FullWidely available
Google ChromeFull support
Yes
Mozilla FirefoxFull support
Yes
Apple SafariFull support
Yes
Microsoft EdgeFull support
Yes
OperaFull support
Yes
Internet ExplorerSupported (legacy MouseEvent)
Yes
mousedownBaseline
Bottom line: Safe for press / drag-start UX. Keep primary activate actions on click for accessibility.
Wrap Up
Conclusion
mousedown is the immediate “button pressed” signal. Use it for press feedback and drag start, pair it with mouseup, and keep primary activation on click.
Check event.button when non-primary presses matter
Clear press state on mouseup / blur / pointercancel
Prefer click for primary activate actions
Prefer addEventListener in production code
❌ Don’t
Replace click with mousedown for primary buttons/links
Assume every press will also produce a click on the same element
Ignore middle/right presses if your UI treats them specially
Forget that pointerdown behaves differently for multi-button mice
Overwrite onmousedown if you need multiple listeners
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about mousedown
Button pressed now—use click for full activation.
5
Core concepts
📱01
On press
fires immediately
Trigger
📄02
MouseEvent
button · coords
API
👆03
vs click
press ≠ activate
Compare
🔄04
mouseup
release pair
Pair
🎯05
Baseline
widely available
Status
❓ Frequently Asked Questions
It fires when a pointing-device button is pressed while the pointer is inside the element. 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 (inherits from UIEvent and Event). 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 (after mousedown and mouseup). Prefer click for primary UI actions so keyboard users are 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.
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.
Did you know?
Holding two mouse buttons can produce multiple mousedown events, but pointerdown typically fires only for the first button. That is one reason MDN highlights the difference between mouse and pointer models.