New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 876662 link

Starred by 14 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 4
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-09-06
OS: Linux , Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Text area starts to type backwards after a text selection in presence of PDF iframe

Reported by marcodit...@gmail.com, Aug 22

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
I posted a small video to illustrate better the behavior. These are the steps anyway:

1. Download all the attachments
2. Open the HTML (that will show text area right to a PDF
2. Type something in a textarea
3. Select text in textarea, by dragging the mouse from right to left, dropping the mouse in the zone containing the PDF iframe
4. Press DELETE to remove the text
5. start typing some words like 'TEST' => the result will be 'TSET'

What is the expected behavior?
That users should always type in the correct direction, even in case they do a text selection in that way.

What went wrong?
If I select the text of input/textarea by dragging the mouse from right to left and ending into PDF iframe, then if I start to type, characters are inserted backwards.

This happens only if right column has an active scroll bar (so there is a overflow-y).

Did this work before? No 

Chrome version: 68.0.3440.106  Channel: stable
OS Version: 10.0
Flash Version: 

None of text areas has an RTL direction.
If there's no vertical scrollbar we don't have the problem.

Problem not spotted on Firefox, IE11, Edge.
Tested only on Windows.
 
TestIFrameTextSelect.html
2.7 KB View Download
TestPDF.pdf
143 KB Download
2018-08-22_11-36-22.mp4
185 KB View Download
Labels: Needs-Triage-M68
 Issue 876656  has been merged into this issue.
Cc: creis@chromium.org susan.boorgula@chromium.org
Labels: -Type-Bug -Pri-2 ReleaseBlock-Stable M-68 Target-70 FoundIn-70 RegressedIn-68 hasbisect FoundIn-68 FoundIn-69 Triaged-ET Target-69 Target-68 OS-Linux Pri-1 Type-Bug-Regression
Owner: dcheng@chromium.org
Status: Assigned (was: Unconfirmed)
marcoditullio89@ Thanks for the update.

Able to reproduce this issue on Windows 10 and Ubuntu 17.10 on the reported version 68.0.3440.106 and latest Canary 70.0.3531.0 as per the original comment.
Note: Issue is not observed on Mac OS 10.13.3.

Bisect Information:
===================
Good Build: 68.0.3440.40
Bad Build : 68.0.3440.41

Unable to run the bisect as this is regressed in branch builds, hence below is the manual changelog URL from omahaproxy

https://chromium.googlesource.com/chromium/src/+log/68.0.3440.40..68.0.3440.41?pretty=fuller&n=10000

From the above Changelog, suspecting the below change:
Reviewed-on: https://chromium-review.googlesource.com/1099183

Assigning this issue to reviewer dcheng@ as the owner creis@ is out of office.
dcheng@ Please check and confirm if this issue is related to your change, else help us in assigning to the right owner.

Adding 'ReleaseBlock-Stable' for M-69 as this is a recent regression. Please feel free to remove if it is not applicable.

Thanks
Cc: dcheng@chromium.org
Owner: kenrb@chromium.org
(assigning to the author of the CL, since I was only a reviewer)
Thanks to all of you, I'm honestly impressed for the quick response.
This is another symptom of  issue 647378 . There had been a hacky workaround for that problem which had to be removed in M68, and I haven't written a proper fix for it. I will be getting to that soon.

The problem is that the part of the page containing the textareas doesn't see you release the mouse button, so it still thinks there is an active drag. The problem goes away immediately if you move the mouse cursor off of the PDF.

I didn't think we usually marked bugs ReleaseBlock-Stable when they are discovered after they have already made it to Stable channel.

Comment 7 Deleted

Specifically it will happen whenever you are selecting text with a right-to-left mouse drag and the mouse crosses over a boundary of a PDF or a cross-origin iframe before you release the button.

The text appears to be entered backward because the mouse is effectively pinning the caret at the beginning of the input area. It behaves as it would normally if you didn't release the mouse button. I don't think we had considered this particular behavior, but it is the same underlying problem as with iframes or PDFs not auto-scrolling when you drag select text and move the mouse off the button of the iframe.
Components: -UI Internals>Sandbox>SiteIsolation Blink>Input
M69 Stable promotion is coming VERY soon. Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and request a merge into the release branch ASAP. Merge has to happen latest by 1:00 PM PT Tuesday (08/28/18) in order to make it to next week stable cut. Thank you.
Labels: M-69
As this issue exists on M68 and we're very close to M69 stable promotion, we won't consider this as M69 stable blocker. Pls lets us know ASAP if there is any concern here. Thank you.
I agree this shouldn't be a stable blocker. It would be difficult to merge a fix in any case.
Labels: -M-69 -M-68 -Target-68 -Target-69 M-70
Targeting fix for M70 per comments #12 and #13.
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/334029e1be165c014c310d2f371433eebc0ee7ff

commit 334029e1be165c014c310d2f371433eebc0ee7ff
Author: Ken Buchanan <kenrb@chromium.org>
Date: Fri Aug 31 19:29:00 2018

Capture mouse events to a widget during drag selection

Currently when the mouse cursor moves between OOPIF boundaries while
a selection is being dragged, the frame containing the selection stops
receiving mouse events. This causes a number of bugs such as the
relevant frame not being aware of when the mouse button is released.

This CL causes Blink's SelectionController to signal the browser
process for mouse capture to the current RenderWidgetHost.

Bug:  876662 ,  864957 ,  647378 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Id9d4bb6bdb6a3fa33b4e15af35a0588e952755fe
Reviewed-on: https://chromium-review.googlesource.com/1197409
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588115}
[modify] https://crrev.com/334029e1be165c014c310d2f371433eebc0ee7ff/content/browser/site_per_process_hit_test_browsertest.cc
[modify] https://crrev.com/334029e1be165c014c310d2f371433eebc0ee7ff/third_party/blink/renderer/core/editing/selection_controller.cc

Able to reproduce this issue on Ubuntu 17.10 on the reported version 68.0.3440.106 and the issue is fixed on the latest M-71 build 71.0.3541.0 as per comment #3.
Can observed that the Text area starts to type correctly after a text selection in PDF iframe.
Attached is the screen cast for reference.

Unable to provide the Windows behavior as the latest M-71 build is not available. 

Thanks..
876662-M71.webm
2.5 MB View Download
Status: Fixed (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-70; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-70 label, otherwise remove Merge-TBD label. Thanks.
Cc: pbomm...@chromium.org
 Issue 880606  has been merged into this issue.
Ken, is this something we can safely merge to M70, per comment 18?  Thanks for the fix!
Labels: Merge-Request-70
It should be okay to merge, but it caused an occasional browser process crash which was separately fixed in r588563. That would have to be merged also.
Cc: abdulsyed@chromium.org
Labels: -Merge-Request-70 -Needs-Triage-M68
NextAction: 2018-09-06
Thanks.  Looks like the crash fix you mention (for issue 880203) is simple as well, though it just landed yesterday.  Let's plan to let that bake one more day and then request merge for both together.  Thanks!
The NextAction date has arrived: 2018-09-06
Labels: -Merge-TBD Merge-Request-70
No more reports of problems, requesting merge. If this is approved, then the fix on issue 880203 will also have to be approved for merge, because that fixes a regression that this CL caused.
Project Member

Comment 25 by sheriffbot@chromium.org, Sep 7

Labels: -Merge-Request-70 Hotlist-Merge-Approved Merge-Approved-70
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

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

Comment 26 by sheriffbot@chromium.org, Sep 10

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

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

Comment 27 by bugdroid1@chromium.org, Sep 10

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71492bd2eba9f53ef41d54ac93aa7c7121928d6b

commit 71492bd2eba9f53ef41d54ac93aa7c7121928d6b
Author: Ken Buchanan <kenrb@chromium.org>
Date: Mon Sep 10 17:46:33 2018

Capture mouse events to a widget during drag selection

Currently when the mouse cursor moves between OOPIF boundaries while
a selection is being dragged, the frame containing the selection stops
receiving mouse events. This causes a number of bugs such as the
relevant frame not being aware of when the mouse button is released.

This CL causes Blink's SelectionController to signal the browser
process for mouse capture to the current RenderWidgetHost.

Bug:  876662 ,  864957 ,  647378 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Id9d4bb6bdb6a3fa33b4e15af35a0588e952755fe
Reviewed-on: https://chromium-review.googlesource.com/1197409
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#588115}(cherry picked from commit 334029e1be165c014c310d2f371433eebc0ee7ff)
Reviewed-on: https://chromium-review.googlesource.com/1216715
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#226}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/71492bd2eba9f53ef41d54ac93aa7c7121928d6b/content/browser/site_per_process_hit_test_browsertest.cc
[modify] https://crrev.com/71492bd2eba9f53ef41d54ac93aa7c7121928d6b/third_party/blink/renderer/core/editing/selection_controller.cc

Cc: krajshree@chromium.org kenrb@chromium.org
 Issue 884702  has been merged into this issue.
Cc: sadrul@chromium.org
 Issue 882491  has been merged into this issue.

Comment 30 Deleted

Sign in to add a comment