The webkitmouseforcechanged event fires whenever Force Touch pressure changes. Learn MouseEvent.webkitForce, force-click thresholds, onwebkitmouseforcechanged, related Force Touch events, portable alternatives, and five try-it labs.
01
Kind
Instance event
02
Type
MouseEvent
03
When
Pressure changes
04
Handler
onwebkitmouseforcechanged
05
Key field
webkitForce
06
Status
Non-standard
Fundamentals
Introduction
Apple’s Force Touch trackpads (and some Force Touch screens) report how hard the user presses. Safari exposes that as proprietary Force Touch events. Among them, webkitmouseforcechanged fires repeatedly while pressure changes during a press.
MDN: it first fires aftermousedown and stops before mouseup. Read the current pressure from event.webkitForce. For cross-browser apps, prefer Pointer Events and PointerEvent.pressure when available.
💡
Beginner tip
Without Force Touch hardware (or outside Safari), this event usually never fires. Always feature-detect and show a clear fallback message in demos.
Concept
Understanding webkitmouseforcechanged
An instance event for Safari Force Touch pressure updates. MDN: fired each time the amount of pressure changes on the trackpad/touchscreen.
Window — after mousedown, before mouseup.
MouseEvent — use non-standard webkitForce for pressure.
Family — with webkitmouseforcewillbegin, webkitmouseforcedown, webkitmouseforceup.
Non-standard — Safari / WebKit proprietary; not Baseline.
Foundation
📝 Syntax
Use the event name with addEventListener, or set the handler property:
Four facts to remember about webkitmouseforcechanged.
Event type
MouseEvent
+ webkitForce
Means
pressure Δ
During press
Engine
Safari
Force Touch
Standard?
no
Non-standard
Hands-On
Examples Gallery
Examples follow MDN Element: webkitmouseforcechanged event and Apple’s Force Touch docs. Labs feature-detect so they still teach useful lessons without Force Touch hardware.
📚 Getting Started
Register handlers the MDN ways and read webkitForce.
Example 1 — addEventListener("webkitmouseforcechanged")
Log pressure whenever it changes during a press (Safari + Force Touch).
JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");
pad.addEventListener("webkitmouseforcechanged", (event) => {
out.textContent = "webkitForce = " + event.webkitForce.toFixed(3);
});
Apple documents comparing against these constants because absolute values can change. Always prefer the named constants over hard-coded numbers when possible.
Example 5 — Force Touch Lifecycle + Pointer Fallback
Log the proprietary Force Touch set when available; otherwise use pressure.
Ship the Pointer Events path for everyone; optionally enhance on Safari Force Touch. Never rely on webkitmouseforcechanged alone for production features.
Applications
🚀 Common Use Cases
Optional Safari-only pressure meters on Force Touch trackpads.
Teaching Apple’s Force Touch event family alongside standard mouse events.
Previewing force-click UI (open preview, speed up media) on supported Macs.
Migrating legacy WebKit Force Touch demos to Pointer Events pressure.
Debugging pressure curves during a press (change stream between down and up).
Under the Hood
🔧 How It Works
1
User presses
mousedown (and often webkitmouseforcewillbegin before it).
Down
2
Pressure varies
webkitmouseforcechanged fires with updated webkitForce.
Change
3
Force click (optional)
webkitmouseforcedown / webkitmouseforceup when crossing force thresholds.
Force
4
✓
Release
Force change events stop before mouseup.
Important
📝 Notes
MDN: Non-standard — status banner required before What You’ll Learn.
Not Deprecated or Experimental on the MDN Element page for this event.
Safari / WebKit Force Touch proprietary—not for sole use in cross-browser products.
Prefer Pointer Events pressure (or a library) as the default path.
webkitmouseforcechanged is marked Non-standard on MDN. Logos use the shared browser-image-sprite.png sprite from this project. Expect Safari on Force Touch hardware only—always ship a Pointer Events pressure fallback.
✓ Non-standard
Element webkitmouseforcechanged
Proprietary WebKit Force Touch pressure-change signal; not a portable primary API.
SafariNot standardized
Google ChromeNo Force Touch events; use Pointer pressure
No
Mozilla FirefoxNo Force Touch events; use Pointer pressure
No
Apple SafariForce Touch trackpad / screen (where hardware supports)
WebKit
Microsoft EdgeNo Force Touch events; use Pointer pressure
No
OperaNo Force Touch events; use Pointer pressure
No
Internet ExplorerNo
No
webkitmouseforcechangedNon-standard
Bottom line: Use Force Touch events only as an optional Safari enhancement; read pressure with PointerEvent.pressure for everyone else.
Wrap Up
Conclusion
webkitmouseforcechanged is Safari’s stream of Force Touch pressure updates during a press. Read webkitForce, compare against Apple’s constants when needed, and never treat it as a cross-browser requirement.
Feature-detect before attaching Force Touch listeners
Prefer Pointer Events pressure for portable UIs
Compare against WEBKIT_FORCE_AT_* constants
Keep Force Touch as an optional Safari enhancement
Test on real Force Touch hardware when shipping Safari extras
❌ Don’t
Require webkitmouseforcechanged for core product features
Assume Chromium/Firefox will ever fire these events
Hard-code magic force numbers when constants exist
Confuse Force Touch with standard Touch Events or Pointer Events
Forget that change events stop before mouseup
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about webkitmouseforcechanged
Safari Force Touch pressure stream—optional, not portable.
5
Core concepts
💪01
Pressure Δ
during press
Event
🖱02
MouseEvent
webkitForce
API
⚖️03
Thresholds
WEBKIT_FORCE_*
Compare
📱04
Prefer
Pointer pressure
Portable
🚫05
Non-standard
Safari only
Status
❓ Frequently Asked Questions
It is a proprietary Safari / WebKit Force Touch event that fires each time the amount of pressure changes on a Force Touch trackpad or touchscreen. It first fires after mousedown and stops before mouseup.
MDN marks Element webkitmouseforcechanged as Non-standard only — not Deprecated and not Experimental. It is not part of any web specification. Prefer portable APIs for production.
A MouseEvent (inherits from UIEvent / Event). Read pressure with the non-standard MouseEvent.webkitForce property.
Use element.addEventListener("webkitmouseforcechanged", handler), or set onwebkitmouseforcechanged where supported. Always feature-detect first.
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN is the minimum for a normal click; MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN is the minimum for a force click. Compare event.webkitForce against them.
Prefer Pointer Events (PointerEvent.pressure) where available, with mouse/touch fallbacks. Treat Force Touch events as an optional Safari enhancement only.
Did you know?
You can also read webkitForce on ordinary mouse events in Safari (such as mousedown / mousemove). The webkitmouseforcechanged event is the dedicated stream for pressure changes between down and up.