New issue
Advanced search Search tips

Issue 908267 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

user-select:none on inline inside anonymous block not honored with window.getSelection()

Reported by christop...@gmail.com, Nov 25

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36

Steps to reproduce the problem:
See https://jsfiddle.net/9a4h0yg1/1/

What is the expected behavior?
Doubleclick selection-routine does not leave the node and window.getSelection().toString() is empty or selects the last char/word.

What went wrong?
Selects all following elements and sets the focus to the bottom div.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.102  Channel: stable
OS Version: 10.0
Flash Version: 

Firefox selects the last selectable char/word in the anchorNode.

Edge selects the last "unselectable" char/word and has the focus on the anchorNode.

Opera acts like Chrome except for this share-popup.
 
Labels: Needs-Bisect
Summary: user-select:none on inline inside anonymous block not honored with window.getSelection() (was: Flexbox, user-select: none and window.getSelection())
Flexbox not required to reproduce this. But it seems that user-select:none has to be applied on an inline inside an anonymous block (try removing the P in the testcase, OR wrapping the SPAN inside another DIV, and things will work fine).
tc.html
1.1 KB View Download
Only chromiums focus changes to the next selectable node that contains text or something similar. - Other Browsers won't leave the focus of the double-clicked node.

This results in a lot of stuff "inbetween" which should not be selected, wrapping the stuff inside more and more nodes doesn't change this behavior.

It produces a similar behavior if you doubleclick on the highlighted area (https://i.imgur.com/FHErhpz.png), the focusnode is the <p> below. Which is inside a separate div. - Which is wrong, as i clicked on the div 'above' with 'Some selectable text'.


Cc: susan.boorgula@chromium.org
Labels: -Needs-Bisect Triaged-ET Target-72 FoundIn-72 M-72 FoundIn-71 FoundIn-70 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
christopher.russ@ Thanks for the issue.

Able to reproduce this issue on Mac OS 10.13.6,Windows 10 and Ubuntu 17.10 on the reported version 70.0.3538.102 and latest Canary 72.0.3622.0 as per the original comment.
This is a Non-Regression issue as this behavior is observed from M-60 chrome builds.
Attached is the screen cast for reference.

Hence marking this as Untriaged for further updates from Dev.

Thanks..
908267-M60.mp4
695 KB View Download
Cc: yosin@chromium.org xiaoche...@chromium.org
Components: Blink>Editing>Selection
Status: Available (was: Untriaged)
This bug is old. Just reproduced it with r501016, which I happened to have checked out.

Sign in to add a comment