Closed Bug 1970398 Opened 1 year ago Closed 10 months ago

[Wayland] Keypress event while initiating tab drag makes toolbar unresponsive until after two clicks or tab drag (leftover movingtab attribute)

Categories

(Core :: Widget: Gtk, defect)

Firefox 138
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox-esr140 --- fixed
firefox139 --- wontfix
firefox140 --- wontfix
firefox141 --- wontfix
firefox142 --- wontfix
firefox143 --- fixed

People

(Reporter: ke5trel, Assigned: stransky)

References

(Blocks 3 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-tabgrps-dnd])

Attachments

(1 file)

STR:

  1. Start with native Wayland on Ubuntu 25.04.
  2. Type in the address bar.
  3. Press and hold the left mouse button over a tab.
  4. Type again in the address bar (still holding left button).
  5. Drag then release left mouse button.
  6. Hover mouse cursor over reload button in toolbar.

Expected:
Toolbar remains responsive.

Actual:
Toolbar unresponsive due to toolbox having leftover movingtab attribute. No error in Browser Console.

Prior to Bug 1955112 (323d3f649a2d) it could only be corrected by dragging a tab but after it can also be corrected with two mouse clicks anywhere in the interface.

Does not happen with MOZ_ENABLE_WAYLAND=0 (XWayland).

MOZ_LOG=WidgetDrag:5 output (including two clicks to recover):

[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::nsDragSession()
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::InvokeDragSession
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::InvokeDragSessionImpl
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700]   numDragItems = 1
[Parent 54721: Main Thread]: D/WidgetDrag adding target application/x-moz-tabbrowser-tab
[Parent 54721: Main Thread]: D/WidgetDrag adding target text/x-moz-text-internal
[Parent 54721: Main Thread]: D/WidgetDrag invisibleSourceDragBegin (7c29d1e1da80)
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::SourceBeginDrag(7c29d1e1da80)
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::SetDragIcon(7c29d1e1da80)
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700]   Surface is missing!
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700]   GdkDragContext [7c29d1e1da80] nsWindow [7c29d4780700]
...
[Parent 54721: Main Thread]: D/WidgetDrag WaylandDragWorkaround applied [buttonPressCountWithDrag 2], quit D&D session
[Parent 54721: Main Thread]: D/WidgetDrag [D 0][7c29cbc43700] nsDragSession::EndDragSessionImpl(0) 1

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=68d1a44fdef33f1256471aa630bebf080599dd4e&tochange=fdc1c87c70f2a9e1eea62291478ba1e3a4a5906f

Regressed by Bug 1953193.

:dao, since you are the author of the regressor, bug 1953193, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(dao+bmo)
Blocks: 1907101
Flags: needinfo?(dao+bmo)
Whiteboard: [fidefe-tabgrps-dnd]

Can you please attach new MOZ_LOG=WidgetDrag:5 from latest nightly? It may be related to unfinished D&D operations.
Thanks.

Flags: needinfo?(ke5trel)

MOZ_LOG=WidgetDrag:5 output (including two clicks to recover after "...") from latest Nightly 141.0a1 (2025-06-05):

[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::nsDragSession()
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::InvokeDragSession
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::InvokeDragSessionImpl
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700]   numDragItems = 1
[Parent 55998: Main Thread]: D/WidgetDrag adding target application/x-moz-tabbrowser-tab
[Parent 55998: Main Thread]: D/WidgetDrag adding target text/x-moz-text-internal
[Parent 55998: Main Thread]: D/WidgetDrag invisibleSourceDragBegin (7c779bd85be0)
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::SourceBeginDrag(7c779bd85be0)
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::SetDragIcon(7c779bd85be0)
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700]   set drag popup [7c77b82f5300]
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700]   GdkDragContext [7c779bd85be0] nsWindow [7c77b884ee00]
...
[Parent 55998: Main Thread]: D/WidgetDrag WaylandDragWorkaround applied [buttonPressCountWithDrag 2], quit D&D session
[Parent 55998: Main Thread]: D/WidgetDrag [D 0][7c77a0f66700] nsDragSession::EndDragSessionImpl(0) 1
Flags: needinfo?(ke5trel)

Thanks. So we know the error here comes from Wayland workaround which is good. But we handle it incorrectly and that's the issue here.

Flags: needinfo?(stransky)

Hm, I'm unable to reproduce. Can you run with

MOZ_LOG="WidgetDrag:5 WidgetDragService:5" env variables and attach the log here?

Thanks.

Flags: needinfo?(stransky) → needinfo?(ke5trel)

Output of MOZ_LOG="WidgetDrag:5 WidgetDragService:5":

[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::nsDragSession()
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::InvokeDragSession
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::InvokeDragSessionImpl
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400]   numDragItems = 1
[Parent 35069: Main Thread]: D/WidgetDrag adding target application/x-moz-tabbrowser-tab
[Parent 35069: Main Thread]: D/WidgetDrag adding target text/x-moz-text-internal
[Parent 35069: Main Thread]: D/WidgetDrag invisibleSourceDragBegin (7b7f05fc0a80)
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::SourceBeginDrag(7b7f05fc0a80)
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::SetDragIcon(7b7f05fc0a80)
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400]   set drag popup [7b7f13e5b200]
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400]   GdkDragContext [7b7f05fc0a80] nsWindow [7b7f2ca51100]
<UNRESPONSIVE TOOLBAR>
[Parent 35069: Main Thread]: D/WidgetDrag WaylandDragWorkaround applied [buttonPressCountWithDrag 2], quit D&D session
[Parent 35069: Main Thread]: D/WidgetDrag [D 0][7b7f10080400] nsDragSession::EndDragSessionImpl(0) 1
[Parent 35069: Main Thread]: D/WidgetDragService [7b7f10080400] EndDragSession | mDoingDrag true
<TOOLBAR RESPONSIVE AFTER TWO CLICKS>
Flags: needinfo?(ke5trel)

It turns out step 2 in Comment 0 STR is not necessary, the address bar does not need to be focused, any keypress event interferes with tab drag and makes the toolbar unresponsive for two clicks.

STR:

  1. Start with native Wayland on Ubuntu 25.04.
  2. Press and hold the left mouse button over a tab without moving cursor.
  3. Press a key (eg "F") while still holding left button.
  4. Attempt to drag the tab then release the left mouse button (tab does not move).
  5. Hover mouse cursor over reload button in toolbar.
Summary: [Wayland] Typing in address bar while initiating tab drag makes toolbar unresponsive until after two clicks or tab drag (leftover movingtab attribute) → [Wayland] Keypress event while initiating tab drag makes toolbar unresponsive until after two clicks or tab drag (leftover movingtab attribute)
Flags: needinfo?(stransky)

Set release status flags based on info from the regressing bug 1953193

Status: NEW → RESOLVED
Closed: 10 months ago
Depends on: 1979719
Resolution: --- → FIXED
Flags: needinfo?(stransky)
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
Assignee: nobody → stransky
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: