Closed Bug 1901764 Opened 1 year ago Closed 1 year ago

clicking a <select> within draggable element can start dragging

Categories

(Core :: Layout: Form Controls, defect)

Firefox 126
Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox127 --- wontfix
firefox128 --- verified
firefox129 --- verified

People

(Reporter: dzaima, Assigned: emilio)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

Attached file Simple HTML demo

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0

Steps to reproduce:

  1. Make an element with draggable="true", with a <select> child. (can be a single <select draggable="true"> too)
  2. Click the select element on the text (i.e. not on the "v" on the right) to prepare to make a selection.
  3. Move the mouse around (to outside the dropdown and the select element).

Actual results:

If the mouse is moved outside the selection element and its dropdown, the selecting will stop and dragging starts, even though the left mouse button is not held down.
Completing the selection without leaving it will still result in the dragging action starting afterwards.

Expected results:

Once the selection dropdown is open and mouse button is released, the dragging action never happens.

Component: Untriaged → DOM: Copy & Paste and Drag & Drop
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → Desktop
Component: DOM: Copy & Paste and Drag & Drop → Layout: Form Controls

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

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Depending on the severity of this issue and the patch risk, we could consider this for uplift.

Sorry for the lag getting to this. I can repro, but only on Linux+X11 (not wayland). Does that match what you're seeing Alice? Thanks

Flags: needinfo?(alice0775)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Sorry for the lag getting to this. I can repro, but only on Linux+X11 (not wayland). Does that match what you're seeing Alice? Thanks

yes,
affected x11 and xwayland.
not affected wayland.

Flags: needinfo?(alice0775)

Windows and macOS don't seem affected either... Which seems pretty weird as my patch didn't have anything platform-specific in it...

This is the same fix as bug 1893177, but for the <label>. It should
ideally not be necessary at all, but it's unclear to me why the target
difference makes us not see the pointer-up event.

That's worth digging into, and will file a follow-up on it, but this
restores the previous behavior exactly, so should be worth doing in the
interim while we figure that out.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Depends on: 1904356
See Also: → 1904356
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/556a2c727e87 Make select label not react to events. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox128 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Comment on attachment 9409196 [details]
Bug 1901764 - Make select label not react to events. r=#layout

Beta/Release Uplift Approval Request

  • User impact if declined: Comment 0
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Restores previous behavior trivially. Follow-up is on file to investigate the root cause of this X11-only regression, but fix is a one-liner.
  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(emilio)
Attachment #9409196 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9409196 [details]
Bug 1901764 - Make select label not react to events. r=#layout

Approved for 128.0b8

Attachment #9409196 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Whiteboard: [qa-triaged]

Reproduced the issue with Firefox 128.0b7 on Ubuntu 22.04 X11. Clicking the dropdown button and moving the mouse will drag the button even if the mouse click is released.
The issue is verified fixed with Firefox 128.0b8 from comment 13 and 129.0a1 (2024-06-25) on Ubuntu 22 X11 and Wayland, macOS 13 and Windows 10x64. The dropdown is no longer dragged after it is clicked and the mouse is moved to the right side.

Status: RESOLVED → VERIFIED
Has STR: --- → yes
Flags: qe-verify+
Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: