Firefox overflow hidden prohibits event firing on other elements

1 min read >

Firefox overflow hidden prohibits event firing on other elements

Engineering Insights & Web Platforms

It seems that for Firefox, the style overflow hidden stops firing onmousemove or onmouseover events. Not sure if there is any standard for this behavior and if Firefox implements it or not. My guess is that there’s probably no standard, or if it is, it should be changed. Take a look at this small demo.

The demo page handles onmousedown, onmouseup, onmousemove, onmouseover events. What happens basically is that when you have two DIVs with NO overflow hidden style, the events are fired correctly (onmouseover when moving your mouse over each one of the DIVs, onmousemove when moving the mouse over each DIV).

But when setting overflow=hidden, suddenly onmousemove and onmouseover are no longer fired when moving your mouse over the other DIV. Instead, Firefox keeps firing onmousemove with the same source, no matter where you are on the page.

Unlock innovation and digital transformation for your business.

Get in touch

We are always happy to talk

Phone

+40-21-223-7700

Email

hello@tremend.com

Address

165 Splaiul Unirii, Timpuri Noi Square,
TN Office 2 building, 4th floor,
District 3, Bucharest, Romania, 030134