User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20060111 Firefox/22.214.171.124 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20060111 Firefox/188.8.131.52 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
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.
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].
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.