Re: [csswg-drafts] [cssom-view] Behavior of MouseEvent.offsetX/Y with inline elements is inconsistent across browsers (#5659)

I was surprised to find out that `MouseEvent.offsetX`, according to [UseCounter](https://www.chromestatus.com/metrics/feature/timeline/popularity/502), is used in 50% of websites!

I did some investigation and found that a main contributor to that could be [this line in jQuery](https://github.com/jquery/jquery/blob/e743cbd28553267f955f71ea7248377915613fd9/test/data/jquery-1.9.1.js#L3259). Apparently jQuery copies some of the mouse event props from the native event to the jQuery event, `MouseEvent.offsetX `being one of them.

So Chrome UseCounter for offsetX/offsetY doesn't check actual usage in this case (and in potential many other cases), but some arbitrary library behavior.



-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5659#issuecomment-725901188 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 12 November 2020 07:43:51 UTC