New issue
Advanced search Search tips

Issue 690272 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 138439



Sign in to add a comment

Selection interface functions should not move focus

Project Member Reported by yosin@chromium.org, Feb 9 2017

Issue description

Implementation of Selection#collapse,collapseTo{Start,End}, extend() call
FrameSelection::setSelection() without DoNoSetFocus option. This means these
API calls move focus to new selected element.

The spec[1] doesn't specify this behavior and Edge and Firefox don't do this,
see [2] for reproduce.

[1] https://www.w3.org/TR/selection-api/#dom-selection-collapse
[2] https://jsfiddle.net/b394qq37/1/

 

Comment 1 by yosin@chromium.org, Feb 9 2017

Also selection#empty,addRange,modify(),removeAllRange() move focus.

Selection#empty() and removeAllRange() are worse; they remove focus or move to BODY.

Comment 2 by tkent@chromium.org, Feb 9 2017

I confirmed that removeAllRange() on focused contenteditable element removed a caret without removing focus in Firefox.

Comment 3 by tkent@chromium.org, Feb 9 2017

Labels: Hotlist-Interop

Comment 4 by tkent@chromium.org, Feb 23 2017

Blocking: 695211
Owner: tkent@chromium.org
Status: Started (was: Available)
This is the root cause of Issue 695211.

Comment 5 by tkent@chromium.org, Feb 24 2017

Blocking: -695211
Labels: Needs-BlinkIntent
Owner: ----
Status: Available (was: Started)

Comment 6 by tkent@chromium.org, Feb 24 2017

This is a canceled CL: https://codereview.chromium.org/2709983005

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 1 2017

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

commit c608fa61bc66ef930ee8902f2d154b4d4fd6e7ed
Author: tkent <tkent@chromium.org>
Date: Wed Mar 01 06:39:23 2017

Selection API: Add a UseCounter for focus change by Selection.modify().

This is a leftover of https://codereview.chromium.org/2718293002/.

BUG=690272

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

[modify] https://crrev.com/c608fa61bc66ef930ee8902f2d154b4d4fd6e7ed/third_party/WebKit/Source/core/editing/DOMSelection.cpp

Comment 9 by tkent@chromium.org, Mar 6 2017

Blocking: 138439
Summary: Selection interface functions should not move focus (was: Selection#collapse,collapseTo{Start,End},extend() should not move focus)

Comment 11 by tkent@chromium.org, Mar 15 2017

NextAction: 2017-05-01
We need to wait until the UseCounter reaches to Stable.

Comment 12 by tkent@chromium.org, Mar 15 2017

Labels: -Pri-1 Pri-2

Comment 13 by tkent@chromium.org, May 21 2017

NextAction: ----
https://www.chromestatus.com/metrics/feature/timeline/popularity/1837

Next step: Make a chromestatus.com entry, and send intent-to-remove

Comment 14 by tkent@chromium.org, Jun 28 2017

> Next step: Make a chromestatus.com entry, and send intent-to-remove

Done: https://www.chromestatus.com/feature/5335417998016512

Next step: Send intent-to-deprecate-and-remove to blink-dev.

Comment 15 by tkent@chromium.org, Jul 12 2017

Labels: -Needs-BlinkIntent
I withdrew the intent.

At least addRange() and selectAllChildren() set focus with all major browsers.  We should check other functions, and update the Selection API specification.

Labels: Pri-3
Project Member

Comment 17 by sheriffbot@chromium.org, Oct 4

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment