New issue
Advanced search Search tips

Issue 629715 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Contenteditable w/ "-webkit-user-select:all" should be partially-selectable.

Project Member Reported by yoichio@chromium.org, Jul 20 2016

Issue description

Version: Version 54.0.2800.0 canary (64-bit)

What steps will reproduce the problem?
(1) Load
'data:text/html, <div contenteditable="true" style="-webkit-user-select:all">foobarbaz</div>'
(2) Try to select only 'bar' string.

What is the expected output?
Only bar is selected.

What do you see instead?
Whole string is selected.


Please use labels and text to provide additional information.

 

Comment 1 by yosin@chromium.org, Jul 20 2016

Components: -Blink>Editing Blink>TextSelection
It seems Firefox selects "foobarbaz" instead of partial selection.
It seems Edge doesn't support use-select:all.

https://jsfiddle.net/t9zrr6zw/1/

Does the spec say contenteditable makes partial selection in user-select:all?


Spec describes:
"on editable elements where the computed value is always contain regardless of the specified value".
Thus contenteditable must be user-select:contain, which behavior is 'text' except for selection over bounds.

Comment 3 by yosin@chromium.org, Jul 20 2016

>#c2, as talked offline, we should read "computed value" as "used value".
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e0f169e61cf7ba643540ec91d16c393a7eaa124

commit 9e0f169e61cf7ba643540ec91d16c393a7eaa124
Author: yoichio <yoichio@chromium.org>
Date: Wed Jul 27 05:00:56 2016

[Editing][Regression] Contenteditable w/ "-webkit-user-select:all" should be editable
for drag.

Dragging inside Contenteditable w/ "-webkit-user-select:all" element should select
 partially rather than all.

This CL introduces the usedValueOfUserSelect function
 deciding whether selection is all or not and use it in rootUserSelectAllForNode
 instead of simple nodeIsUserSelectAll.

BUG= 629715 
TEST=LayoutTests/editing/selection/mouse/drag-user-select-all-textarea.html, drag-
user-select-all-contenteditable.html

Review-Url: https://codereview.chromium.org/2151803003
Cr-Commit-Position: refs/heads/master@{#408045}

[add] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/LayoutTests/editing/selection/mouse/drag-user-select-all-contenteditable.html
[add] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/LayoutTests/editing/selection/mouse/drag-user-select-all-textarea.html
[modify] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/LayoutTests/editing/selection/user-select/user-select-all-contenteditable.html
[modify] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/Source/core/editing/EditingStrategy.cpp
[modify] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/9e0f169e61cf7ba643540ec91d16c393a7eaa124/third_party/WebKit/Source/core/editing/SelectionController.cpp

Status: Fixed (was: Assigned)

Comment 6 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Sign in to add a comment