Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice) OS: Linux this bug is related to finding position of mouse cursor on the page via javascript. for some time, it worked this way (I tested it in some Konq 3.x when I made it bud I don't remember which version exactly - for some time, I used mostly MozillaFirebird as my primary browser): function getMouseXY(e) { if (navigator.userAgent.indexOf("Konqueror")!=-1) { // grab the x-y pos if browser is Konqueror tempX = e.clientX tempY = e.clientY } else if (IE) { // grab the x-y pos.s if browser is IE tempX = event.clientX + document.body.scrollLeft tempY = event.clientY + document.body.scrollTop } else { // grab the x-y pos.s if browser is NS / Mozilla etc... tempX = e.pageX tempY = e.pageY } if (tempX < 0){tempX = 0} if (tempY < 0){tempY = 0} return true } but now, it doesn't take scrolling into account. it always returns values like if I was on top of the page. (I tried all three ways and none of them works now) test case is here: http://www.nyx.cz/code/kbug.html scroll down, click on some icon and scroll back up to see the context menu there. correct behavior of course is to show the menu somewhere over the icon (x=-10, y=-10 from the area, where the user clicked).
I raise that up as I very often didn't notice a popup that appeared out of view because of this bug
*** Bug 67580 has been marked as a duplicate of this bug. ***
I see the situation like this: for KDE 3.1: - clientX/Y reports position in the window - pageX/Y is undefined for KDE 3.2 - clientx/Y reports position in the window - pageX/Y reports also position in the window Good behaviour is: - clientx/Y reports position in the window - pageX/Y reports position in the page This breaks the common way to find mouse position: if (e.pageX || e.pageY) { posx = e.pageX posy = e.pageY } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft posy = e.clientY + document.body.scrollTop } To test, see page http://www.quirksmode.org/js/events/mouseposition.html
*** Bug 71842 has been marked as a duplicate of this bug. ***
CVS commit by mueller: unfiddle various mouse coordinate mess CCMAIL: 74718-done@bugs.kde.org CCMAIL: 70290-done@bugs.kde.org M +5 -0 ChangeLog 1.202 M +11 -13 khtmlview.cpp 1.618 M +25 -3 dom/dom2_events.cpp 1.12 M +10 -2 dom/dom2_events.h 1.15 M +6 -0 ecma/kjs_dom.cpp 1.171 M +2 -6 ecma/kjs_events.cpp 1.82 M +17 -6 xml/dom2_eventsimpl.cpp 1.44 M +8 -2 xml/dom2_eventsimpl.h 1.39 M +13 -10 xml/dom_nodeimpl.cpp 1.228