Right click in compose clears selection - Write composing area highlight text right click 'Undo', 'Cut', 'Copy' and 'Delete' is disabled
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | unaffected |
firefox-esr115 | --- | unaffected |
firefox119 | --- | unaffected |
firefox120 | --- | fixed |
firefox121 | + | fixed |
People
(Reporter: anjeyelf, Assigned: masayuki)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(1 file)
Windows 10 OS
beta 120.0b5
- Click on 'Write' or 'Reply'
- 'Write' message window opens.
- Enter anything in the composing area.
- Highlight text - single word, sentence or use Ctrl +A
- Right click on highlighted text
Actual Results
Text immediately becomes not highlighted
Upon Right click menu has 'Undo', 'Cut', 'Copy' and 'Delete' as disabled
Expected REsults
Highlighted text to remain highlighted
Upon right click all menu items to be enabled.
Additional:
tested in 'Troubleshoot Mode' and get same results.
tested in 'Offline' and 'Online' modes and get same result.
Bug is Right click on highlighted text removes the highlight,
so it will not offer 'Undo', 'Cut', 'Copy' and 'Delete' as options.
Comment 1•9 months ago
|
||
Confirmed on trunk.
![]() |
||
Comment 2•9 months ago
|
||
Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=0a321cb2cc86f70624abf56fb7b2fb263d1bd4ce&tochange=753d64bf01f2443dbb91fbf9f6cdf64ea3cd1ac2
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6404412771ea15ef1c719a515dd1369360fb8d4d&tochange=de9287a68ed836a8fd2eb2ba90de0770a18c877a
Suspect:
81712ea026098ff0a4d5739d4deae97fcb21f296 Masayuki Nakano — Bug 1845241 - Make nsIFrame::HandleEvent
move caret when secondary mouse button down r=edgar,emilio,dom-core
Assignee | ||
Comment 4•9 months ago
|
||
Indeed, I reproduce it in Thunderbird too. Fortunately, I reproduce this bug within Firefox if I load data:text/html,<iframe srcdoc="abc" onload="event.target.contentDocument.designMode='on'"></iframe>
.
Comment 5•9 months ago
|
||
Set release status flags based on info from the regressing bug 1845241
Assignee | ||
Comment 6•9 months ago
|
||
[Tracking Requested - why for this release]:
This is a serious regression for web apps which use designMode
(I'm not sure how may apps using the legacy editor mode) or making <html>
content-editable. Perhaps, backing-out bug 1845241 from the release candidate is the most reasonable fix for this in this stage.
Assignee | ||
Comment 7•9 months ago
|
||
The simplest testcase is data:text/html,<html contenteditable>abc</html>
- Load
data:text/html,<html contenteditable>abc</html>
- Do "Select all"
- Right click on the selected text
Assignee | ||
Comment 8•9 months ago
|
||
If <body>
or something which is not the root element is the editing host, this bug is not reproducible.
Assignee | ||
Comment 9•9 months ago
|
||
This is a simple mistake of the previous patch. The code path is originally for
a left click handling. Therefore, there is no check whether the click point is
in a selection range because in that case, left click should collapse selection.
However, the selection should not be collapse when it's a right click in a
selection range because the context menu target is the selection range.
The ui.mouse.right_click.collapse_selection.stop_if_non_collapsed_selection
pref is set to true
by default. Therefore, the existence of a non-collapsed
selection has hidden this bug. However, it's set to false
, this always
happens. Additionally, editor does not set ancestor limiter of selection if the
root element is editable [1]. I think that we can now remove this special path,
but it's risky. Therefore, this patch just adds the new check into the method.
Updated•9 months ago
|
Comment 10•9 months ago
|
||
fixed in 120.0rc2 by backout of the regressor (bug 1845241)
Assignee | ||
Comment 11•9 months ago
|
||
(In reply to Dianna Smith [:diannaS] from comment #10)
fixed in 120.0rc2 by backout of the regressor (bug 1845241)
Thank you very much!
Comment 12•9 months ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/85b941e46e82 Make `nsIFrame::MovingCaretToEventPointAllowedIfSecondaryButtonEvent` check whether the right click point is in a selection range first r=emilio
Comment 13•9 months ago
|
||
bugherder |
Description
•