‘Copy Link to Highlight’ selects additional text
Categories
(Core :: DOM: Selection, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | unaffected |
firefox-esr140 | --- | unaffected |
firefox141 | --- | unaffected |
firefox142 | --- | disabled |
firefox143 | --- | verified |
People
(Reporter: oardelean, Assigned: jjaschke)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Found in
- Nightly 142.0a1;
Affected versions
- Nightly 142.0a1;
Tested platforms
- Windows 10;
- macOS 15;
- Ubuntu 22;
Affected platforms
- Windows 10;
- macOS 15;
- Ubuntu 22;
Unaffected platforms
- N/A;
Preconditions
- dom.text_fragments.enabled to TRUE
- dom.text_fragments.create_text_fragment.enabled set to TRUE
Steps to reproduce
- Launch Firefox.
- Go to https://en.wikipedia.org/wiki/Percent-encoding
- Select the double quotation mark - “ .
- Right-click on the selection and select ‘Copy Link to Highlight’.
- Open a new tab and paste the link in the address bar.
- Observe the highlighted paragraphs in the page.
Expected result
- Only the quotation mark is highlighted.
Actual result
- Highlight is also applied to the first word after the quotation mark.
Regression range
- Not a regression.
Updated•3 months ago
|
Assignee | ||
Comment 1•3 months ago
|
||
This patch adds a new check in the beginning of the algorithm which leaves the
input range unchanged if its content is only punctuation characters.
This edge case is handled by checking if all characters are punctuation and would return early, hence not going into the algorithm that extends the range to word boundaries
(which would become more complex trying to achieve the same).
Additionally, this patch contains a minor refactoring: Other edge cases in the input range
(empty range, whitespace-only ranges) are moved into the function that extends the
range to word boundaries.
Updated•3 months ago
|
Comment 4•2 months ago
•
|
||
Verified during 143 Nightly testing on Mac and Ubuntu with additional manual verification for Windows.
Description
•