Mouse events not reliably captured when pointer leaves browser window

NEW
Unassigned

Status

()

Core
Event Handling
12 years ago
8 years ago

People

(Reporter: a507, Unassigned)

Tracking

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

When listening to mouse events "mouseup" and "mousemove" in capture mode, a program cannot count on receiving events once the pointer has left the browser window.

Whether or not events are reported seems to depend on the type and configuration of the element whose "mousedown" handler added listeners for the up and move events. Some cases I have enumerated:

1) div with content works
2) div with no content does not work
3) image does not work
4) div contained in another div with overflow=auto works for text
5) div contained in another div with overflow=auto with added br tag fails

See the reference URL for demonstrations.



Reproducible: Always
Assignee: nobody → events
Component: General → Event Handling
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
(Reporter)

Comment 1

12 years ago
Found a way to make a non-working case work one time...

1) Drag from a working case element to outside the browser window and release the mouse button there. Status should show that mouse button was released.

2) Try a non-working case. It will work one time only.

I can't reproduce with the testcase. However, this seems similar to bug 294844.

Comment 3

12 years ago
Related to bug 272897?
The mouse capture behavior has changed quite considerably on trunk. Now none of the cases in the linked testcase work. This is very likely due to the changes made by Robert in bug 317375. The only testcase I know to work now is bug 294844 attachment 184050 [details].
Status: UNCONFIRMED → NEW
Ever confirmed: true
Martijn, jwatt, do you think this is a bug or not? From bug 294844 I presume that Martijn says no and Jonathan says yes :-). What do other browsers do?
Over the years I've encountered the need to capture mouse events from outside the browser window time and again, so for me, this is definitely a bug. On the other hand (although I've not encountered it myself) Frank's use case from bug 294844 comment 4 does seem legitimate. I think that like Martijn I'd like to see this be more controllable. I have a proposal for that, but I'll make it in bug 294844.

As for what other browsers do, the testcases simply don't work in IE, and Opera 9 seems somewhat broken. On this bug's URL it seems to allow dragging outside the window both below and above the window, so long as the cursor doesn't move left of the left border or right of the right border. Very strange.
Assignee: events → nobody
QA Contact: ian → events
You need to log in before you can comment on or make changes to this bug.