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

Issue 707156 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
inactive
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Text selection highlight is missing for selected text leaving behind the selection pins

Reported by ahalder@etouch.net, Mar 31 2017

Issue description

Application Version: 59.0.3057.0
Android Build Number: 6.0.1/MMB29K
Device: Samsung Galaxy J7


Steps to reproduce:
1. Launch Chrome > Search anything ex. 'hi' in this case
2. Long tap on a word(s) to select text (observe blue text selection highlight)
3. Long tap on any link from search page and dismiss the contextual menu
4. Observe selection and selection pins


Observed behavior:
Text selection highlight vanishes but selection pins stay back

Expected behavior:
Text selection highlight for selected text should always stay along with selection pins


Frequency: 
<5/5>

Additional comments:
Last Good Build: 59.0.3055.0
First Bad Build: 59.0.3056.0

This issue is reproducible on Samsung Galaxy S4(GTI9500)(5.0.1/LRX22C), Google Pixel (7.1.1/NOF27B), Spice Mi-498(6.0.1/MOB31E), Karbonn Sparkle V(5.1.1/LMY47V), Samsung Galaxy S3(GTI9300)(4.3/JSS15J), Nexus 7 (6.0.1/MOB30J), Nexus 9(7.1.1/N4F26T), Samsung Galaxy J7(SM-J700F)(6.0.1/MMB29K), Samsung Galaxy J2(SM-J200G)(5.1.1/LMY47X)

Bisect Range: https://chromium.googlesource.com/chromium/src/+log/59.0.3055.0..59.0.3056.0?pretty=fuller&n=10000

 

Comment 1 by ahalder@etouch.net, Mar 31 2017

Please find logs and video @ http://go/chrome-androidlogs1/7/707156
Components: Blink>Editing>Selection
Labels: -Pri-3 M-59 Pri-2 Type-Bug
Owner: tedc...@chromium.org
Status: Available (was: Unconfirmed)
Cc: tedc...@chromium.org
Owner: aelias@chromium.org
Labels: -Type-Bug hasbisect-per-revision Type-Bug-Regression
Culprit CL : https://chromium.googlesource.com/chromium/src/+/92bf3c29fccac551acceff254e53d7ea73367158


Comment 5 by aelias@chromium.org, Mar 31 2017

Cc: hu...@opera.com amaralp@chromium.org
Labels: -Restrict-View-Google
I'm reverting it.  As the contributor is from Opera, attaching a publicly visible video for reference:
screenrecord-20170331_142718.mp4
3.1 MB View Download
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 1 2017

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

commit 1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065
Author: aelias <aelias@chromium.org>
Date: Sat Apr 01 00:00:23 2017

Revert of Reland: Do not send redundant selectionchange-events (patchset #29 id:560001 of https://codereview.chromium.org/2616623002/ )

Reason for revert:
Caused  http://crbug.com/707156 , please reland after fixing it.

BUG= 707156 

Original issue's description:
> Reland: Do not send redundant selectionchange-events (decouple focus)
>
> Reason for reland:
> Update Win7/10 LayoutTests correctly:  crbug.com/706119 
>
> Background:
> Blink tells browser-side when a new <input>-element gets focus.
> The information is passed in the
> ViewHostMsg_TextInputStateChanged-message.
>
> Problem:
> With current logic, RenderFrameImpl::didChangeSelection is
> called twice so two ViewHostMsg_TextInputStateChanged-messages
> are sent to browser-side:
>  (1) when focus leaves an <input>-field (unnecessary!).
>  (2) when focus enters another <input>-field.
>
> Worse, also the web page gets two selectionchange events.
> The first one is immediately invalid so the webpage should
> not react to it.
>
> (1) happens because FocusController::setFocusedElement()
> always clears the selection when a new element gets focus.
>
> Solution:
> When JavaScript moves focus to an element, element.focus(),
> and when the user moves focus using tab-key navigation or
> mouse, we don't clear the old selection (we hide it). This
> means, we only send one selectionchange event, not two, for
> each caret jump (as in Firefox).
>
> Test updates:
> 1. Check for one selectionchange event, not two.
> 2. LayoutTests' trees now expect the "hidden" selection.
> 3. A new test in WebFrameTest.cpp tests tab-key navigation.
>
> Follow-up will remove the remaining redundant clears:
>  crbug.com/692898  (tab jumps to non-editable elements).
>
> BUG= 678601 ,  679635 ,  699015 
> TEST=In content_shell, select some text in an <input>-field,
>      click another <input>-field (move focus).
>      Notice: one selectionchange event is fired.
>
> Review-Url: https://codereview.chromium.org/2616623002
> Cr-Commit-Position: refs/heads/master@{#460314}
> Committed: https://chromium.googlesource.com/chromium/src/+/92bf3c29fccac551acceff254e53d7ea73367158

TBR=amaralp@chromium.org,bokan@chromium.org,kochi@chromium.org,yosin@chromium.org,hugoh@opera.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 678601 ,  679635 ,  699015 

Review-Url: https://codereview.chromium.org/2791753002
Cr-Commit-Position: refs/heads/master@{#461278}

[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/content/test/data/android/input/input_forms.html
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/editing/selection/focus-and-display-none-and-redisplay-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/fast/events/touch/gesture/focus-selectionchange-on-tap-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/fast/forms/focus-selection-input-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/linux/plugins/mouse-click-plugin-clears-selection-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac-mac10.10/plugins/mouse-click-plugin-clears-selection-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac-mac10.9/plugins/mouse-click-plugin-clears-selection-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/mac/plugins/mouse-click-plugin-clears-selection-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrolled-mask-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/LayoutTests/platform/win/plugins/mouse-click-plugin-clears-selection-expected.txt
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/Source/core/editing/PendingSelection.cpp
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/Source/core/page/FocusController.cpp
[modify] https://crrev.com/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
[delete] https://crrev.com/b4c713070f5634b5ea05a677bd0160370c776d7a/third_party/WebKit/Source/web/tests/data/editable_elements.html

Status: Fixed (was: Available)

Comment 9 by ahalder@etouch.net, Apr 4 2017

This issue is fixed on latest M59-59.0.3062.0 Thanks!
Status: Verified (was: Fixed)
Issue 707230 has been merged into this issue.

Sign in to add a comment