Open Bug 163727 Opened 22 years ago Updated 2 years ago

button-up not tracked when dialog open

Categories

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

x86
Linux
defect

Tracking

()

People

(Reporter: jwz, Unassigned)

Details

Mozilla sometimes doesn't stop tracking selections when the mouse is released.
Here's how to reproduce it:


Turn off click-to-type and auto-raise in your window manager (so that focus
follows mouse, and so that it's possible to focus on windows that are not the
topmost window.)

Create two Mozilla windows, call them A and B.

Position B so that it overlaps A, in such a way that the left half of the URL
field in A is visible, and the right half is obscured by B.

In B, select File / Open Web Location.

Click and hold the mouse in the URL field in A (the bottom window.)
Drag the mouse, button down, directly to the right, until the mouse is
over B (and A.)

Release the mouse.

(What should happen is that you now have a selection in the text field in A.)

Now, with the mouse button not held down, move the mouse back to the left,
still over the text field in A.

Note that the selection highlighting in the text field in A is still tracking
the mouse as if the button was down!  It should have stopped tracking when the
button was released.

For some reason it chose to disregard the button-up event, because the release
happened when the topmost window under the mouse was B instead of A.  This is
actually a good trick, since the way X implicit grabs work ensures that the
button-up event got delivered to A.

This happens with all kinds of text fields in A, not just the URL field.
E.g., it happens with the text field in this bugzilla page, too.

It is necessary for there to be a dialog box up on B for it to happen.
If there's no dialog box up on window B, then the problem does not occur.

mozilla-1.0.0-5.ximian.1, sawfish-1.0-ximian.6, Red Hat Linux 7.2.
QA Contact: rakeshmishra → trix
http://bugzilla.mozilla.org/show_bug.cgi?id=179125#c3

joki is no longer here
Assignee: joki → saari
QA Contact: trix → ian
Assignee: saari → nobody
QA Contact: ian → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.