Middle button double-click broken in FF68

I’ve an extension that captures middle button double-clicks, and it has stopped working on FF68. It was working fine on FF67 and before:

document.addEventListener("dblclick", function(ev) {
  // Double-click with middle button

Any idea what changed, or if this is a regression?

Looks like an intentional change:

Starting in Firefox 68, dblclick events are only sent for the primary mouse button, per the specification.

Source: https://developer.mozilla.org/docs/Web/API/Element/dblclick_event#Browser_compatibility

I notice that is for web content, but it may also be true for extension pages.


Thank you. I only checked release notes; never occurred to me to visit MDN.

FWIW, the spec:

As with the click event, the dblclick event should only be fired for the primary pointer button. Secondary buttons MUST NOT fire dblclick events.

And this seems to be the bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1379466#c56.

Looks like I’d have to stick to timer magic for detecting double-click.