New issue
Advanced search Search tips

Issue 716725 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Caret is lost and prevents further user input when selection's collapse API is used on input elements

Reported by vad.kako...@gmail.com, Apr 29 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

Steps to reproduce the problem:
1. Enter a value in an input
2. Select it programmatically
3. Get the selection by using document.getSelection method
4. Collapse the selection by using, say selection.collapseToEnd method

What is the expected behavior?
Selection collapses according to the API method used, caret is visible and allows for further input

What went wrong?
Caret is no longer visible and further input is impossible

Did this work before? Yes 57.0.2987.133

Chrome version: 58.0.3029.81  Channel: stable
OS Version: OS X 10.12.4
Flash Version: 

Also reproduced in Canary, version 60.0.3084.0 (Official Build) canary (64-bit).

Please see https://jsfiddle.net/pb3gy9x4

Thanks!
 

Comment 1 by kochi@chromium.org, May 1 2017

Components: -Blink Blink>Editing
Components: -Blink>Editing Blink>Editing>Selection
Labels: M-58
Owner: tkent@chromium.org
Status: Assigned (was: Unconfirmed)
Seems to be caused by https://codereview.chromium.org/2704963002

DOMSelection::getRangeAt() adjusts the selection if it's in shadow DOM

Should we obtain the selection range directly from FrameSelection?

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

Labels: -M-58 M-59 OS-Android OS-Chrome OS-Linux OS-Windows
Status: Started (was: Assigned)
Safari and Edge have the behavior same as Chrome 57.
As for Firefox, collapseToEnd() doesn't affect selection in text fields.

Comment 5 by tkent@chromium.org, May 12 2017

Labels: Merge-Request-59
Status: Fixed (was: Started)
Project Member

Comment 6 by sheriffbot@chromium.org, May 12 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by bugdroid1@chromium.org, May 12 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/396f776a055cbc3ec68f71847783926d70b06a16

commit 396f776a055cbc3ec68f71847783926d70b06a16
Author: Kent Tamura <tkent@chromium.org>
Date: Fri May 12 08:47:35 2017

Merge "Selection API: collapseToStart() and collapseToEnd() should work for text fields." to M59

BUG= 716725 

Review-Url: https://codereview.chromium.org/2869703004
Cr-Original-Commit-Position: refs/heads/master@{#470824}
Review-Url: https://codereview.chromium.org/2877793003 .
Cr-Commit-Position: refs/branch-heads/3071@{#525}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[add] https://crrev.com/396f776a055cbc3ec68f71847783926d70b06a16/third_party/WebKit/LayoutTests/editing/selection/collapseto_in_text_fields.html
[modify] https://crrev.com/396f776a055cbc3ec68f71847783926d70b06a16/third_party/WebKit/Source/core/editing/DOMSelection.cpp

Thank you  for send me my bugs i be More careful Next Time.

12 maj 2017 10:12 "sheriff… via monorail" <
monorail+v2.4164592774@chromium.org> napisał(a):

Sign in to add a comment