JavaScript Element webkitmouseforcechanged Event

Beginner
⏱️ 11 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Non-standard
Instance event

What You’ll Learn

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

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 after mousedown 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.

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.

📝 Syntax

Use the event name with addEventListener, or set the handler property:

JavaScript
addEventListener("webkitmouseforcechanged", (event) => { });

onwebkitmouseforcechanged = (event) => { };

Event type

A MouseEvent (inherits from UIEvent / Event).

Handy Force Touch properties & constants

NameMeaning
event.webkitForceCurrent pressure amount (non-standard)
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWNMinimum force for a normal click
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWNMinimum force for a force click
clientX / clientYPointer position in the viewport (standard MouseEvent)

⚡ Quick Reference

GoalCode
Listenel.addEventListener("webkitmouseforcechanged", fn)
Handler propertyel.onwebkitmouseforcechanged = fn
Read pressureevent.webkitForce
Near force click?event.webkitForce >= MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
Portable alternativepointermove + event.pressure
MDN statusNon-standard

🔍 At a Glance

Four facts to remember about webkitmouseforcechanged.

Event type
MouseEvent

+ webkitForce

Means
pressure Δ

During press

Engine
Safari

Force Touch

Standard?
no

Non-standard

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);
});
Try It Yourself

How It Works

Press and vary pressure on a Force Touch surface. On other browsers the handler simply never runs—pair with feature detection in real UIs.

Example 2 — onwebkitmouseforcechanged Property

MDN’s alternate style using the event handler property.

JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");

pad.onwebkitmouseforcechanged = (event) => {
  out.textContent = "onwebkitmouseforcechanged · " +
    event.webkitForce.toFixed(3);
};
Try It Yourself

How It Works

Prefer addEventListener when you need multiple listeners or easy removal.

📈 Detect, Thresholds & Lifecycle

Feature-detect Safari Force Touch, compare thresholds, watch the full set.

Example 3 — Feature-Detect Force Touch Events

Tell learners whether this engine looks Force Touch capable.

JavaScript
const out = document.getElementById("out");
const supported =
  "onwebkitmouseforcechanged" in window ||
  "onwebkitmouseforcechanged" in document.documentElement;

out.textContent = supported
  ? "Force Touch event properties look available (likely Safari)."
  : "No webkitmouseforcechanged here — use PointerEvent.pressure.";

if (supported) {
  document.getElementById("pad").addEventListener(
    "webkitmouseforcechanged",
    (event) => {
      out.textContent = "Pressure: " + event.webkitForce.toFixed(3);
    }
  );
}
Try It Yourself

How It Works

Property presence is a hint, not a guarantee of Force Touch hardware. Treat a positive result as an optional enhancement path.

Example 4 — Compare Against Force Thresholds

Use Apple’s constants to classify normal click vs force click pressure.

JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");

pad.addEventListener("webkitmouseforcechanged", (event) => {
  const f = event.webkitForce;
  const click = MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN;
  const forceClick = MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN;

  let level = "light";
  if (f >= forceClick) level = "force-click";
  else if (f >= click) level = "click";

  out.textContent =
    level + " · webkitForce=" + f.toFixed(3) +
    " (click≥" + click + ", force≥" + forceClick + ")";
});
Try It Yourself

How It Works

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.

JavaScript
const pad = document.getElementById("pad");
const out = document.getElementById("out");

function log(msg) {
  out.textContent = msg;
}

const forceOk = "onwebkitmouseforcechanged" in window;

if (forceOk) {
  pad.addEventListener("webkitmouseforcewillbegin", () => log("willbegin"));
  pad.addEventListener("webkitmouseforcechanged", (e) =>
    log("changed · " + e.webkitForce.toFixed(3))
  );
  pad.addEventListener("webkitmouseforcedown", () => log("forcedown"));
  pad.addEventListener("webkitmouseforceup", () => log("forceup"));
} else {
  pad.addEventListener("pointerdown", (e) => {
    log("pointerdown · pressure=" + e.pressure);
  });
  pad.addEventListener("pointermove", (e) => {
    if (e.buttons) log("pointermove · pressure=" + e.pressure);
  });
}
Try It Yourself

How It Works

Ship the Pointer Events path for everyone; optionally enhance on Safari Force Touch. Never rely on webkitmouseforcechanged alone for production features.

🚀 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).

🔧 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.

📝 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.
  • Related learning: transitionstart, pointerdown, gesturestart, addEventListener(), JavaScript hub.

Non-standard / Safari Force Touch Support

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.

Safari Not standardized
Google Chrome No Force Touch events; use Pointer pressure
No
Mozilla Firefox No Force Touch events; use Pointer pressure
No
Apple Safari Force Touch trackpad / screen (where hardware supports)
WebKit
Microsoft Edge No Force Touch events; use Pointer pressure
No
Opera No Force Touch events; use Pointer pressure
No
Internet Explorer No
No
webkitmouseforcechanged Non-standard

Bottom line: Use Force Touch events only as an optional Safari enhancement; read pressure with PointerEvent.pressure for everyone else.

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.

Continue with webkitmouseforcedown, pointerdown, or the JavaScript hub.

💡 Best Practices

✅ Do

  • 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

Key Takeaways

Knowledge Unlocked

Five things to remember about webkitmouseforcechanged

Safari Force Touch pressure stream—optional, not portable.

5
Core concepts
🖱 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.

Next: webkitmouseforcedown

Learn Safari Force Touch force-click down.

webkitmouseforcedown →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful