Selected text changes selection when switching to multi-line editor mode
Categories
(DevTools :: Console, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox-esr78 wontfix, firefox74 wontfix, firefox75 wontfix, firefox76 wontfix, firefox77 wontfix, firefox78 wontfix, firefox79 verified)
People
(Reporter: atrif, Assigned: nchevobbe)
References
Details
(Keywords: regression)
Attachments
(2 files)
Affected versions
- 76.0a1 (20200323092419)
- 75.0b7 (20200322132212)
- 74.0 (20200309095159)
Affected platforms
- Windows 10 x64
- Ubuntu 18.04
- macOS 10.15
Steps to reproduce
- Open Firefox and Web Console.
- Paste a large expression (e.g:
` Spans with 'e': `+ Array.from(document.querySelectorAll("span")) .map(el => el.textContent) .filter(s => s.includes("e")) .join(" ")
. - Select the expression (Ctrl+ A).
- Switch to multi-line editor mode and observe the selected text.
- Switch back to in line mode and observe the selected text.
Expected result
- At step 4 and step 5, all text remains selected as expected.
Actual result
- At step 4 the selection of the text is moved (not all text is selected as expected).
- At step 5 the selection of the text remains like in multi-line editor mode (not all text is selected as expected).
Regression Range
- Reproduced with 73.01 (20200217142647) as well. I will search for one ASAP if there is one.
Notes
- Attached a screen recording with the issue.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Looks like the same issue as Bug 1622783. Let's see if this is fixed when we land it.
Comment 2•5 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
Attaching the pushlog when returning to in line editor mode the selected text remains all selected as expected (step5).
Last good revision: af62dfeb5c0eeb6e5bf5a8626f2556f3fa0d7cd2
First bad revision: 938ba43a3350c4f81a5ed152b02eb92f9e68c949
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=af62dfeb5c0eeb6e5bf5a8626f2556f3fa0d7cd2&tochange=938ba43a3350c4f81a5ed152b02eb92f9e68c949
For Step4 I think the issue is not a regression, the selection changes when entering editor mode while having a large expression selcted.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3
(Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3
(normal.)
Assignee | ||
Comment 5•4 years ago
|
||
This patch adds a ResizeObserver to the input node, which when triggered
refreshes the codeMirror instance.
This is needed because codeMirror draws specific elements, like the cursor
and selection blocks, and they need to be re-computed if the editor size
changed (the line might have wrapped, and the cursor need to be in a new
position now).
Depends on D78649
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Reporter | ||
Comment 8•4 years ago
|
||
Verified the issue using Firefox 79.0a1 (20200622093309) on Windows 10x64, macOS 10.12 and Ubuntu 18.04. The text is no longer selected after switching to multiline/single line editor mode.
Description
•