Issue metadata
Sign in to add a comment
|
Placeholder text becomes selectable and prevents pasting |
||||||||||||||||||||||
Issue descriptionChrome Version: 70.0.3521.0 OS: Android What steps will reproduce the problem? (0) Have text copied to the clipboard (1) Visit https://battre.github.io/prefilled-text/ (2) Long press on the placeholder text (actually, try to long press on the rim of the input field, I think that's what triggers it) What is the expected result? The long press menu shows up with an option to paste. Placeholder text is not selected. What happens instead? Placeholder text gets selected, long press menu does not show paste option. This is super bad as it affects e.g. top pages like the age verification flow of Amazon Germany (amazon.de/fsksettings). There it is a super annoying case (you can't copy and paste your super long IBAN bank account number). Not reproducible in 68.0.3440.91 Given Issue 866371 I suspect that this is also reproducible in M69, and thus mark this as a RBS. I didn't get a chance to test this on M69 myself, yet.
,
Aug 14
Adding |user-select: none| to -webkit-input-placeholder could fix this issue. http://crrev/c/1174963. I am trying to add a test for this, but this seems only repro on Android, not sure the long press test like [1] would trigger the code path on Android though. [1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/exported/web_view_test.cc?rcl=68b4d2e190a0c62890099b7953bf26d9d131cebd&l=2889
,
Aug 22
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/acd424b3d4bc0991d9d4533494e102d6c185239e commit acd424b3d4bc0991d9d4533494e102d6c185239e Author: Shimi Zhang <ctzsm@chromium.org> Date: Wed Aug 22 19:43:42 2018 [Blink] Don't select placeholder text in <input> when long press below. https://crbug.com/873999 shows that placeholder text in <input> could be selected by long press below it. This is because for this code path we passed a corrected click point. y-coordinate was adjusted to 0, which will lead |LayoutBlock::PositionForPointIfOutsideAtomicInlineLevel()| give a incorrect result, then in |SelectionController::SelectClosestWordFromHitTestResult()|, it gets the placeholder <div> in the <input> Shadow DOM as the hit test result position. We now pass the normal point so it could figure out the position is at <input>, which is more reasonable. Bug: 873999 Change-Id: I6d9ee4d03778ad65493eff8735d58cf271d07a57 Reviewed-on: https://chromium-review.googlesource.com/1174963 Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#585208} [modify] https://crrev.com/acd424b3d4bc0991d9d4533494e102d6c185239e/third_party/blink/renderer/core/exported/web_view_test.cc [modify] https://crrev.com/acd424b3d4bc0991d9d4533494e102d6c185239e/third_party/blink/renderer/core/layout/layout_block_flow.cc [add] https://crrev.com/acd424b3d4bc0991d9d4533494e102d6c185239e/third_party/blink/renderer/core/testing/data/input_placeholder.html
,
Aug 22
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ctzsm@chromium.org
, Aug 14Labels: -Pri-1 -ReleaseBlock-Stable Pri-2
Owner: ctzsm@chromium.org
Status: Assigned (was: Untriaged)