Closed Bug 37338 Opened 25 years ago Closed 25 years ago

highlight sometimes follows mouse when button up

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED DUPLICATE of bug 36711

People

(Reporter: akkzilla, Assigned: pavlov)

References

()

Details

(Whiteboard: have fix)

Go to the bugzilla query page. Scroll if necessary so that the two "email:" text fields are visible. (Or use any page with two text fields visible.) Click in the first field, and type some chars. Click in the second field, and type some chars. Now click back and forth between the two text fields, trying to make each click as rapid (less time between down/up) as possible, and moving the mouse sideways (but with button up) a bit after each click. Sometimes you'll see a text highlight following the mouse even when the button is up. If you put a printf in nsFrame::HandlePress and nsFrame::HandleRelease which also prints "this", you'll see that sometimes you don't get a release at all, sometimes you get two presses for the same frame followed by releases for two different frames, and other odd behavior. Debugging further, it turns out that nsClipboard::HasDataMatchingFlavors is being called from the press, and the release is coming in while we're still looping waiting for the X selection event, and for some reason, this is causing the release event to be mishandled or dropped. One possible fix is to write an event loop which the clipboard code could call which would queue up all non-clipboard events coming in during this time, then loop over them and dispatch them when the clipboard is finished. But that's a hack; it would be better if our event system was robust enough to handle problems like this, since they'll come up again.
I described a possibly related incorrect behavior as part of bug 37201: "After a few pixels of selecting, mozilla decides that you're trying to drag a link. When you let go of the mouse button, it extends the selection to where you dropped it and then goes to the index file of the directory the file is in."
Whiteboard: have fix
*** Bug 36382 has been marked as a duplicate of this bug. ***
*** Bug 36793 has been marked as a duplicate of this bug. ***
while the titles don't sound the same, this bug is caused by the same thing that is causing 36711 which I have attached a patch to. Please follow that bug *** This bug has been marked as a duplicate of 36711 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Updating QA Contact.
QA Contact: ckritzer → lorca
Verified dupe, both bugs based on the nsClipboard::HasDataMatchingFlavors function being called reentrantly.
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.