[wayland][xwayland] Cannot drag bookmarks out of folders or overflow menu in toolbar
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: gliu10000, Assigned: stransky)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
Attachments
(6 files)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
- Open latest Firefox Nightly
- Show bookmark toolbar
- Create a bunch of bookmarks on the toolbar until you have multiple bookmarks in the overflow menu
- Drag a bookmark out of the overflow menu onto the toolbar
Actual results:
We escape out of bookmark dragging mode so it is impossible to move bookmarks
Expected results:
Bookmark should be dropped onto the toolbar
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
I'm pretty sure this belongs under bookmarks & history
Assignee | ||
Comment 3•3 years ago
|
||
That may be Wayland specific issue. Please run nightly on terminal with MOZ_ENABLE_WAYLAND=0 env variable and retest.
Thanks.
Yeah I can confirm it appears to be Wayland-specifc. It doesn't repro when MOZ_ENABLE_WAYLAND=0 is set.
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Can you create a screencast of the issue?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Collect_information_for_a_bug_report
Thanks.
The same occurs for folders in the bookmarks toolbar, when trying to drag items outside the popup, it closes and the drag operation gets cancelled.
Wayland: Drag operation stops when popup closes.
XWayland: Drag operation get stuck when popup closes, item cannot be moved and operation needs to be cancelled.
X11: Drag operation continues after popup closes.
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
Assignee | ||
Comment 12•2 years ago
|
||
Looks like when the source (popup) window is closed the D&D is canceled.
Assignee | ||
Comment 13•2 years ago
|
||
Yes, we need to source popup opened to keep the D&D running. The popup is closed by browser / js code. Emilio, any idea where to look to disable the source D&D popup close?
Thanks.
Assignee | ||
Updated•2 years ago
|
Comment 14•2 years ago
|
||
It's closed from a timer here: https://searchfox.org/mozilla-central/rev/ffa4d00965c5281def6d3ddcbcdf6259d38c9b9a/browser/components/places/content/places-menupopup.js#140-151
Assignee | ||
Comment 15•2 years ago
|
||
Assignee | ||
Comment 16•2 years ago
|
||
Comment on attachment 9298592 [details]
Screencast from 10-14-2022 11:14:58 AM.webm
Thanks Emilio, that fixes half of the cases here. We need another fix to keep opened leaf popup if it's source of D&D. I guess that close comes from common menu handlers - any idea where should look at?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 17•2 years ago
|
||
I think we should generally block any close attempt if a popup is source of D&D action on Wayland. I wonder what happens if we ignore close/hide request from layout - may that cause any trouble? Is such popup marked as closed by layout or does layout query actual popup state from widget code?
Assignee | ||
Comment 18•2 years ago
|
||
We need to handle it on JS/layout level. Fiddle with popup visibility on widget level brings many issues here.
Assignee | ||
Comment 19•2 years ago
|
||
I think the best way how to fix that is add 'is_drag_source' attribute to the popup element at JS level and don't close such popup. I see the popup is MozElements type. Emilio, any hint how to add it there? I already have such attribute ready as a member of nsWindow. So we may export it by nsIWidget, but how to get that from/by popup?
Assignee | ||
Comment 20•2 years ago
|
||
Looks like we may add it to https://searchfox.org/mozilla-central/source/dom/webidl/XULPopupElement.webidl
Comment 21•2 years ago
|
||
Yeah, that seems sensible off-hand. Do you still need me to look at where the popup is closed? FWIW the thing I tend to do is just put a DumpJSStack()
call in here (or a printf + rr for native code)
Assignee | ||
Comment 22•2 years ago
|
||
Thanks, I think I'm on track.
Assignee | ||
Comment 23•2 years ago
|
||
From all the tests I did I think the best variant is to keep the popup opened on widget/gtk level. It's difficult to keep the popup opened on JS level as it needs various hacks spread in the code and I didn't manage to do that properly anyway.
Assignee | ||
Comment 24•2 years ago
|
||
We also need to use that on XWayland too.
Assignee | ||
Comment 25•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 26•2 years ago
|
||
On Wayland Drag&Drop is canceled by compositor if source window is closed so keep it open.
Depends on D161127
Assignee | ||
Comment 27•2 years ago
|
||
More background info according to Wayland protocol:
https://www.mail-archive.com/wayland-devel@lists.freedesktop.org/msg41784.html
Comment 28•2 years ago
|
||
Comment 29•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a8608560898
https://hg.mozilla.org/mozilla-central/rev/2d88e30472c7
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Description
•