DCHECK fails when long-pressing Amazon password input |
||||||
Issue descriptionChrome Version: M62 (although probably present for earlier builds) OS: Android What steps will reproduce the problem? (1) Go to amazon.com on an Android device (2) Go to the login page (3) Type "password" into the password input field and then long-press the password field. What is the expected result? DCHECKs shouldn't fail. What happens instead? The DCHECK (DCHECK_LE(start_position_, end_position_);) in the EphemeralRange constructor fails (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/EphemeralRange.cpp?rcl=ab61848245075e2ca3f5d9dce134ea2fc0a73488&l=44) The DCHECK gave error: [FATAL:EphemeralRange.cpp(44)] Check failed: start_position_ <= end_position_ (INPUT id="ap_password" class="auth-clear-icon-visible" (editable) (focused)@afterAnchor vs. #text "password"@offsetInAnchor[8]) This is the summarized callstack: EphemeralRangeTemplate() (line 44) VisibleSelectionTemplate.Validate() (line 488) SelectionController.SelectClosestWordFromHitTestResult()
,
Sep 13 2017
,
Sep 13 2017
,
Sep 14 2017
,
Sep 14 2017
The Amazon password field has markup that looks like: <input type="password" id="ap_password"> #shadow-root (user-agent) <div id="placeholder">Amazon password</div> <div id="inner-editor"></div> </input> When you long-press, we set both the start and end position inside the inner-editor element: DIV id="inner-editor" (editable)@offsetInAnchor[0] VisibleSelection attempts to move the start and end positions to the word boundary: https://chromium.googlesource.com/chromium/src/+/30e1a4396cbd07167a20721d5a8aa08e1973bcd1/third_party/WebKit/Source/core/editing/VisibleSelection.cpp#508 The end position doesn't move, but the start position moves *forward* to INPUT id="ap_password" (editable) (focused)@afterAnchor which is now *after* the end position. So I think StartOfWord() (and maybe EndOfWord() as well) needs to be revised as mentioned in crbug.com/735774 : https://bugs.chromium.org/p/chromium/issues/detail?id=735774#c19
,
Feb 1 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by amaralp@chromium.org
, Jul 26 2017Cc: yosin@chromium.org
Components: Blink>Editing>Selection
Status: Assigned (was: Untriaged)