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 descriptionUserAgent: 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!
,
May 1 2017
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?
,
May 9 2017
Safari and Edge have the behavior same as Chrome 57. As for Firefox, collapseToEnd() doesn't affect selection in text fields.
,
May 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/053f34e3a33c62ff262483e92223971aae60de9d commit 053f34e3a33c62ff262483e92223971aae60de9d Author: tkent <tkent@chromium.org> Date: Thu May 11 05:37:41 2017 Selection API: collapseToStart() and collapseToEnd() should work for text fields. BUG= 716725 Review-Url: https://codereview.chromium.org/2869703004 Cr-Commit-Position: refs/heads/master@{#470824} [add] https://crrev.com/053f34e3a33c62ff262483e92223971aae60de9d/third_party/WebKit/LayoutTests/editing/selection/collapseto_in_text_fields.html [modify] https://crrev.com/053f34e3a33c62ff262483e92223971aae60de9d/third_party/WebKit/Source/core/editing/DOMSelection.cpp
,
May 12 2017
,
May 12 2017
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
,
May 12 2017
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
,
May 12 2017
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 |
||||||
Comment 1 by kochi@chromium.org
, May 1 2017