FOCUS: Wrong context menu after hiding selection
Reported by
dchau...@etouch.net,
Apr 25 2017
|
||||||||||
Issue descriptionChrome Version: 60.0.3080.0 (Official Build)70d2a00a72c50c344436f139b2a3f5c09ec337bf-refs/heads/master@{#466837} 32/64-bit. OS: Windows (7,8,8.1,10),Linux (14.04 LTS),Mac OS X(10.10.5, 10.11.4). What steps will reproduce the problem? 1. Launch chrome and navigate to chrome://md-settings/ page. 2. Keep focus on 'Learn more' link (or any link) under 'People' section using 'Tab' key. 3. Now, press 'Shift' + 'F10' key from keyboard to open context menu and observe. Text box context menu is displayed for 'Learn more' link. Link context menu should display for 'Learn more' link. This is a regression issue, broken in M-60 series, below is manual regression range. Good build: 59.0.3071.0 Bad build: 60.0.3072.0 Kindly review the attached screen-cast for reference.
,
Apr 25 2017
I cannot explain this one. dpapad@, can you? @yosin, let's revert my CL until we understand these regressions better?
,
Apr 25 2017
,
Apr 25 2017
Assigning to yosin@ for reverting. I tried to revert but the original CL can't be rolled back cleanly at this point.
,
Apr 26 2017
When the selection is hidden, context menu should use focused element as context (not the caret position). Minimal repro: <input autofocus><a href="www"">link</a> 1. Hit tab key to go focus the link. 2. Shift+F10. Expected: Context menu for <a>. Actual: Context menu for <input>.
,
Apr 26 2017
Here's a quick fix: https://codereview.chromium.org/2841093002
,
Apr 27 2017
,
Apr 27 2017
I could not reproduce on 60.0.3081.0. Context menu is showed at link, e.g. "learn more" Could you do bisect? I would like to know which CL fixed this issue.
,
Apr 27 2017
Please ignore #c8. I could reproduce with 60.0.3081.0 Sorry for confusion.
,
Apr 27 2017
Issue 715905 has been merged into this issue.
,
May 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8549ed4eaf9d95db494bd7028bf17110b26b6918 commit 8549ed4eaf9d95db494bd7028bf17110b26b6918 Author: hugoh <hugoh@opera.com> Date: Thu May 11 05:28:29 2017 Algorithm for deciding if a frame's selection should be hidden Background: Crrev.com/464698 introduced "hiding" of unfocused selections in text controls. Hiding avoids clearing the selection upon change of focus. Problem: Now we only hide selections inside text controls. Selections within content-editable elements must also be hidden. Solution: Generalize previous work into an algorithm that, given current DOM and its activeElement, determines whether a frame's selection should be hidden. See the algorithm in InHidden() for documentation and read its unit tests in FrameSelectionTest.cpp. BUG= 715059 , 715889 Review-Url: https://codereview.chromium.org/2841093002 Cr-Commit-Position: refs/heads/master@{#470822} [modify] https://crrev.com/8549ed4eaf9d95db494bd7028bf17110b26b6918/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/8549ed4eaf9d95db494bd7028bf17110b26b6918/third_party/WebKit/Source/core/editing/FrameSelection.h [modify] https://crrev.com/8549ed4eaf9d95db494bd7028bf17110b26b6918/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp [modify] https://crrev.com/8549ed4eaf9d95db494bd7028bf17110b26b6918/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/8549ed4eaf9d95db494bd7028bf17110b26b6918/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
May 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff7930cd4d17f38e69016d96024acadf8a008a4d commit ff7930cd4d17f38e69016d96024acadf8a008a4d Author: hugoh <hugoh@opera.com> Date: Mon May 15 10:28:59 2017 Make context menu aware of hidden selection When the frame's selection is hidden, the context menu should use the focused element (not the selection) as context. BUG= 715059 Expected: Context menu for <a>. Review-Url: https://codereview.chromium.org/2869713003 Cr-Commit-Position: refs/heads/master@{#471719} [modify] https://crrev.com/ff7930cd4d17f38e69016d96024acadf8a008a4d/third_party/WebKit/LayoutTests/NeverFixTests [add] https://crrev.com/ff7930cd4d17f38e69016d96024acadf8a008a4d/third_party/WebKit/LayoutTests/fast/events/contextmenu-follows-focus.html [modify] https://crrev.com/ff7930cd4d17f38e69016d96024acadf8a008a4d/third_party/WebKit/Source/core/input/EventHandler.cpp
,
May 15 2017
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by msrchandra@chromium.org
, Apr 25 2017Owner: hu...@opera.com
Status: Assigned (was: Unconfirmed)