Text selection is lost after move mouse pointer from contextmenu in certain case
Categories
(Core :: DOM: Selection, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox150 | --- | unaffected |
| firefox151 | --- | unaffected |
| firefox152 | --- | verified |
| firefox153 | --- | verified |
People
(Reporter: alice0775, Assigned: ltenenbaum)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(2 files)
Steps to reproduce:
- Open the attached testcase.html
- Right-click the selected text to display the context menu.<br>
- Move the mouse pointer over the menu.<br>
- Move the mouse pointer outside the menu.
Actual results:
Text selection will be removed.
Screencast: https://youtu.be/KxsQqjPx7gE
Expected results:
The text selection should remain unchanged.
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=f5e2ce3571f7886ab30ecfd9f33027581c53e8ac&tochange=088ccf5be2cc238d3758f606b82ff25fcf8e8ce9
Comment 1•1 month ago
|
||
:ltenenbaum, since you are the author of the regressor, bug 2032191, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 2•1 month ago
|
||
This issue also reproduces on Nightly152.0a1 on Ubuntu 24.04.
| Reporter | ||
Updated•1 month ago
|
| Assignee | ||
Comment 3•1 month ago
|
||
Yes, unfortunately this happens due to the hack we added in bug 2032191 of setting the selection when the focused element becomes non-focusable to prevent regressions. Here's a simpler case that exhibits the same behavior (really, it is more to do with removing the tabindex attribute than opening the contextmenu). We could fix this by not changing the selection if it is already in the focused element, but this will be fixed by bug 2034851, which will hopefully make it into 152 anyways…
| Assignee | ||
Updated•1 month ago
|
Updated•28 days ago
|
Updated•28 days ago
|
Updated•24 days ago
|
Updated•22 days ago
|
Reproducible on a 2026-05-09 Firefox Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 153.0a1 and Firefox 152.0b2 on Windows 10, Ubuntu 22, macOS 15.
Description
•