[Bug 136985] layerX/layerY wrong when mouse is over scrollbar

Klaus Reimer k at ailis.de
Mon Sep 3 11:34:20 UTC 2007


Public bug reported:

Binary package hint: firefox

When you have a DIV with scrollbars (overflow:scroll or overflow:auto)
and connect a mouse handler like "onmousemove" to the div then
event.layerX must contain the X mouse position relative to the upper
left corner of the DIV. But this doesn't work in Firefox when the mouse
is over the scrollbar. Firefox "wraps" the mouse position so it begins
with X=0 at the left edge of the scrollbar. This is bad because in this
way Javascript cannot determine if the mouse is over the scrollbar or if
the mouse is on the left side of the DIV. Here is a demo:

http://www.ailis.de/~k/permdata/20070903/scrollbar.html

Move the mouse over the div and then move it to the right over the
scrollbar and watch the displayed X coordinate wrapping from 186 to 1.
Other browsers behave correctly. Tested it in IE, Safari, Konqueror and
Opera. In my opinion the mouse events should not fire at all when the
mouse pointer is over the scrollbar but my opinion is not important. So
I think this should be fixed so Firefox behaves like all other browsers
and don't "wrap" the mouse position.

I also tested the current Firefox Nightly Build and the problem is still
present there.

ProblemType: Bug
Architecture: i386
Date: Mon Sep  3 13:26:05 2007
DistroRelease: Ubuntu 7.04
Package: firefox 2.0.0.6+1-0ubuntu1
PackageArchitecture: i386
SourcePackage: firefox
Uname: Linux vincent 2.6.20-16-generic #2 SMP Fri Aug 31 00:55:27 UTC 2007 i686 GNU/Linux

** Affects: firefox (Ubuntu)
     Importance: Undecided
         Status: New

-- 
layerX/layerY wrong when mouse is over scrollbar
https://bugs.launchpad.net/bugs/136985
You received this bug notification because you are a member of Mozilla
Bugs, which is a bug contact for firefox in ubuntu.




More information about the Ubuntu-mozillateam-bugs mailing list