When I start drag a bookmark in any Bookmarks popup, the Bookmarks popup closes immediately

RESOLVED FIXED in mozilla2.0b9



8 years ago
8 years ago


(Reporter: alice0775, Assigned: enndeakin)




Firefox Tracking Flags

(blocking2.0 final+)



(1 attachment, 1 obsolete attachment)



8 years ago
Build Identifier:
Mozilla/5.0 (X11; Linux i686; rv:2.0b8pre) Gecko/20101209 Firefox/4.0b8pre ID:20101209030340

See http://forums.mozillazine.org/viewtopic.php?p=10205813#p10205813

When I drag start a bookmark in any Bookmarks popup, the Bookmarks popup closes immediately.

And This does not happen Windows build.

Reproducible: Always

Steps to Reproduce:
1. Start Minefield with new profile
2. drag start a bookmark in any Bookmarks popup(Bookmarks in Menubar, Bookmarks toolbar, Chevron, Firefox Button)

Actual Results:
 When I drag start a bookmark in any Bookmarks popup, the Bookmarks popup closes immediately.
 And leaves that bookmark visible.

Expected Results:
 Bookmarks popup should not hide.

Regression window:
Mozilla/5.0 (X11; Linux i686; rv:2.0b7pre) Gecko/20100916 Firefox/4.0b7pre ID:20100916030125
Mozilla/5.0 (X11; Linux i686; rv:2.0b7pre) Gecko/20100917 Firefox/4.0b7pre ID:20100917034123

In local build:
Build from 
4097291a632c : Fails
5a68532076bf : Works

Regressd by 4097291a632c  Neil Deakin — Bug 522956 - Clicking Larry's "More Information" button opens Page Info dialog but doesn't close Larry. r=karlt a=b


8 years ago
blocking2.0: --- → ?
Assignee: nobody → enndeakin
blocking2.0: ? → final+

Comment 1

8 years ago
Looks like a focus-out event occurs when a drag begins, causing the popup to rollup.

Comment 2

8 years ago
Karl, do you know why this might happen?
Versions of GTK prior to 2.18 (somewhere around Oct 2009) grabbed the keyboard
during a drag.  Grabbing the keyboard moves focus.

At the X11 protocol level Focus events due to grabs are distinguishable from
normal focus events, however GDK does not provide this distinction.

With more recent GTK (2.20.1 here), the behaviour I see is that the menu
closes when the pointer leaves the menu.  If that is the expected behavior
(and it seems reasonable to me), then we may wish to reconsider the importance
of this bug.
As for a fix, possibly OnContainerFocusOutEvent could skip check_for_rollup if a drag is in progress.  I haven't really thought through possible issues from async events, and whether or not rollup should be performed on drag completion.

Comment 5

8 years ago
The bookmarks code handles closing the popup itself. It closes the popup manually when dragging outside of it and any descendants. It doesn't expect the popup to close automatically while dragging.

Comment 6

8 years ago
After talking with Marco a bit, I realized that description wasn't quite correct.

The ideal behaviour is that the popup closes when dragging outside of it. But special cases may need to occur when a submenu is involved. For example, dragging from a submenu to a parent menu should close the submenu but keep the parent open. Similarly, dragging to a submenu should keep both open.

I will try a patch that implements comment 4.

Comment 7

8 years ago
Posted patch Patch (obsolete) — Splinter Review
Attachment #497324 - Flags: review?(karlt)


8 years ago
Whiteboard: [has patch][needs review karl]
Comment on attachment 497324 [details] [diff] [review]

I think we still want to check_for_rollup if the focus changes during a drag started in another application (Another application may begin a drag without taking focus), and it is easy enough to check for same-application drag with nsIDragSession::GetSourceNode (or you may know a better way), so I think it's best that we do that.

Comment 9

8 years ago
Posted patch Updated patchSplinter Review
Attachment #497324 - Attachment is obsolete: true
Attachment #499124 - Flags: review?(karlt)
Attachment #497324 - Flags: review?(karlt)
Attachment #499124 - Flags: review?(karlt) → review+


8 years ago
Keywords: checkin-needed
Whiteboard: [has patch][needs review karl] → [has patch]

Comment 10

8 years ago
Last Resolved: 8 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Whiteboard: [has patch]
Target Milestone: mozilla2.0 → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.