Closed Bug 267463 Opened 20 years ago Closed 20 years ago

mouse within iframe sends different coordinates with button up or down

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

1.7 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: j.l.h.hartmann, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910

When moving the mouse over an iframe, the onmouseover event generates
coordinates relative to the upper-left corner of the iframe. However, when
dragging the mouse from outside the iframe to inside with the button *down*
coordinates will remain global to the main page. Alternatively, when dragging
out of the iframe into the main page, local iframe coordinate system will be
returned and preserved in the main page. In IE an iframe will always send back
local coordinates. Very difficult to write system wide cursors and zoomboxes
this way

Reproducible: Always
Steps to Reproduce:
1. Call http://e41.yellow.sara.nl/testmouse.html
2. Drag the mouse from outside to inside the iframe (button up) and look at the
status bar
3. Do the same with button down
4. Repeat previous two steps going from inside to outside

Actual Results:  
Different coordinates are returned when moving with button up or down

Expected Results:  
A mouse event within an iframe should always return coordinates local to that iframe
Summary: mouse within iframe sends different coordinates with button up or down → mouse within iframe sends different coordinates with button up or down
WORKSFORME
(In reply to comment #1)
> WORKSFORME
I remember this behavior has changed a few times between Mozilla 1.3 and 1.7. In
my browser (Mozilla 1.7.3) dragging over an iframe border with mouse button down
does *not* change the coordinate system as it should. Happens both on my Windows
and Linux machine 
confirming for Firefox, when the mouse is down, coordinates will remain in the
same coordinate system where the drag was started 
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2

Mozilla Trunk is always delivering the same coordinates, inside the IFRAME local
coordinates, outside the iframe window coordinates doesn´t matter wether mouseup
or down.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a5) Gecko/20041104
 
confirming Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.4) Gecko/20041101

This behaviour is seen on Branch only, not on Trunk.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Trunk → 1.7 Branch
And it's not changing on branch.  Marking worksforme, since it does.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.