New issue
Advanced search Search tips

Issue 873999 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Placeholder text becomes selectable and prevents pasting

Project Member Reported by nepper@chromium.org, Aug 14

Issue description

Chrome 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.
 
Cc: -ctzsm@chromium.org
Labels: -Pri-1 -ReleaseBlock-Stable Pri-2
Owner: ctzsm@chromium.org
Status: Assigned (was: Untriaged)
I can repro this on Chrome Android, steps:

1. Focus in username <input> element.
2. Long press outside of username <input> element (blank area below <input>).

However this is not the same to  issue 866371  I believe.

I can repro  issue 866371  with desktop Chrome but can't repro this one on desktop Chrome, it might be Android specific.

I can repro this with 68.0.3440.91 (current stable version) and 66.0.3359.158 (system image of the device.), removing RBS.
Summary: Placeholder text becomes selectable and prevents pasting (was: Regression: Placeholder text becomes selectable and prevents pasting)
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
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment