Bug 116437
Summary: | Double clicking to select text range incorrectly selects across markup boundaries | ||
---|---|---|---|
Product: | WebKit | Reporter: | Matt Bradley <matt> |
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Minor | CC: | ahmad.saleem792, rniwa, webkitbugzilla |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.8 |
Matt Bradley
I have observed this in definition lists. It may exhibit elsewhere:
Given the following markup:
<dl>
<dt>Definition Label</dt>
<dd>Text Content</dd>
</dl>
Double clicking the word "text" above, creates a selection range across the words "Label" and "Text", ignoring the </dt><dd> word boundary and the whitespace. Copying the selection into the paste buffer results in the "LabelText" being stored.
Triple clicking the word "text" results in the correct selection of the content between <dd> and </dd>, giving us a selection of "Text Content"
Putting a non-breaking space in to the markup forces the missing word boundary, eg:
<dl>
<dt>Definition Label </dt>
<dd>Text Content</dd>
</dl>
Double clicking "Text" now selects the word "Text" only, and this is all that will be copied into the paste buffer, but the selection range displayed on screen appears to take in everything from the to the end of the word "Text"
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Hovis
I have seen this behavior with dt, dd elements in Firefox 40.0.3 on Windows 7.
I suspect this is standards-compliant behavior.
Ahmad Saleem
I am unable to reproduce this issue by converting the test case from Comment 0 into JSFiddle below and then double clicking on "Text" and it does not select "Label" word as mentioned in Comment 0 and this behavior is consistent with all browsers (Safari 16, Chrome Canary 108 and Firefox Nightly 107).
Link - https://jsfiddle.net/o8x6wvh4/show
If it is reproducible, please reopen and share updated details of how to reproduce step. Meanwhile I am marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!