Closed Bug 1667138 Opened 4 years ago Closed 4 years ago

Selection extended over space on doubleclick

Categories

(Core :: DOM: Selection, defect)

80 Branch
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: jj.sarton, Assigned: saschanaz)

Details

Attachments

(1 file)

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

Steps to reproduce:

Create the a file with the following content:

<html lang="en"><body><div><p>Test, these are <strong> strong </strong> <em> italic </em> normal.</p></div></body></html>

Perform double click on the word normal, italic or strong.

Actual results:

The selection is extended to the left, e.g:

are strong italic normal
if the word normal is double clicked

Expected results:

The selection should not be extended, only the clicked word should be selected.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Selection
Product: Firefox → Core
Severity: -- → S3
Flags: needinfo?(krosylight)
Flags: needinfo?(krosylight)

Word breaking spaces could be incorrectly skipped if it was trimmed by CSS whitespace rules. This patch makes sure it can still break words when selecting text.

Assignee: nobody → krosylight
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3371e7c6b726 Do not skip backward word breaker r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25818 for changes under testing/web-platform/tests
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: