New issue
Advanced search Search tips

Issue 712341 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 671916



Sign in to add a comment

[MacViewsBrowser] Pressing Space on the Remove Bookmark Button Relaunches the Bookmark Flow

Project Member Reported by shrike@chromium.org, Apr 17 2017

Issue description

Chrome Version: 60.0.3072.0 (MacViews)
OS: macOS 10.12

What steps will reproduce the problem?
(1) Use the Tab key to focus on the bookmarks star - press Space to click it
(2) In the Bookmarks dialog that appears, tab until the Remove button is selected
(3) Press Space

What is the expected result?
The current URL is removed from bookmarks and the Bookmarks dialog orders out.

What happens instead?
The Bookmarks dialog orders out but then orders back in, and the bookmark star is blue, indicating that the current URL is still bookmarked.
 

Comment 1 by shrike@chromium.org, Apr 17 2017

Summary: [MacViewsBrowser] Can’t tab out of bookmarks dialog (was: [MacViewsBrowser] Can’t tab into bookmarks bar)
(wrong description)

Comment 2 by tapted@chromium.org, Apr 18 2017

Blocking: 671916
I suspect the `Remove` button in secondary UI correctly hooks keydown, but we haven't gotten around to updating the location decoration to _not_ hook keyup on Mac.

(this suggests the browser view bookmarks star location bar decoration is doing its own keystroke handling rather than just relying on the framework, which is probably what needs to be fixed).
Labels: M-68
[Bulk Edit]
Applying M-68 milestone per email discussion with ellyjones@. Pls change it if milestone is incorrectly applied. 
Labels: -M-68 Target-68
Owner: robliao@chromium.org
Status: Assigned (was: Available)
MacViews triage: let's target a fix for this in M-68. Over to you, robliao@ :)

Comment 5 by gov...@chromium.org, Mar 27 2018

Labels: M-68

Comment 6 by gov...@chromium.org, Mar 29 2018

** Bulk Edit **

FYI: Starting 04/13 M68 will be in canary, M68 Dev promotion will be on 04/26.

Comment 7 by gov...@chromium.org, Apr 25 2018

Pls mark the bug as fixed if CL is landed in trunk and nothing else is pending. Thank you.
Status: Started (was: Assigned)
Investigating...
Attached the stack where the bookmark bubble is reshown
Stack.txt
5.3 KB View Download
Labels: -Target-68 Target-69
Cc: lgrey@chromium.org nyerramilli@chromium.org rbasuvula@chromium.org
 Issue 850458  has been merged into this issue.
Labels: MacViews-Release
Summary: [MacViewsBrowser] Pressing Space on the Remove Bookmark Button Relaunches the Bookmark Flow (was: [MacViewsBrowser] Can’t tab out of bookmarks dialog)
Labels: Hotlist-Polish
Status: Assigned (was: Started)
This requires enabling MacOS full keyboard access.
Labels: -MacViews-Release
Labels: -M-68 Group-Focus_Input_Selection_Activation_KeyState
Labels: M-68
Labels: -M-68 M-69
Labels: -M-69 -Target-69 M-70 Target-70
Cc: ellyjo...@chromium.org pbomm...@chromium.org
 Issue 883282  has been merged into this issue.
Labels: -Pri-2 Pri-1
Owner: ellyjo...@chromium.org
Yoink!
The root cause is this:

bool PageActionIconView::OnKeyPressed(const ui::KeyEvent& event) {
  if (event.key_code() != ui::VKEY_RETURN && event.key_code() != ui::VKEY_SPACE)
    return false;

  AnimateInkDrop(views::InkDropState::ACTIVATED, nullptr /* &event */);
  // As with Button, return activates on key down and space activates on
  // key up.
  if (event.key_code() == ui::VKEY_RETURN)
    ExecuteCommand(EXECUTE_SOURCE_KEYBOARD);
  return true;
}

bool PageActionIconView::OnKeyReleased(const ui::KeyEvent& event) {
  if (event.key_code() != ui::VKEY_SPACE)
    return false;

  ExecuteCommand(EXECUTE_SOURCE_KEYBOARD);
  return true;
}

I don't know why this behavior exists but it means that the key down event is handled by the bubble (dismissing it) and then the key up is handled by the star, activating it.
Project Member

Comment 24 by bugdroid1@chromium.org, Sep 19

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

commit 5540a9cb7ec95a28dcfb97f9ce92520799a71647
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Wed Sep 19 13:22:41 2018

views: use platform spacebar behavior in PageActionIconView

On Mac, the spacebar activates buttons on keydown; on other platforms it
activates them on keyup. Not implementing this behavior here caused the
following bug:

1) User focuses the bookmark bar star
2) User hits space to activate it, which opens the bubble
3) User tabs to the "Remove" button
4) User hits space to activate that button
5) The "Remove" button activates on keydown and the bubble dismisses
6) The star gets keyboard focus again
7) The star immediately handles the keyup and reopens the bubble!

The fix is for PageActionIconView to honor the platform spacebar affinity. There
is an old TODO in this code to merge it with views::Button but I would not want
to merge such a change back to beta so this small fix seems more expedient.

Bug:  712341 
Change-Id: If932928bb069493e61f78f2d34e95a0aa45fb504
Reviewed-on: https://chromium-review.googlesource.com/1230437
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592379}
[modify] https://crrev.com/5540a9cb7ec95a28dcfb97f9ce92520799a71647/chrome/browser/ui/views/page_action/page_action_icon_view.cc
[modify] https://crrev.com/5540a9cb7ec95a28dcfb97f9ce92520799a71647/chrome/browser/ui/views/page_action/page_action_icon_view.h

Labels: Merge-Request-70
Requesting merge to M70, although I don't intend to actually merge until this has had some time on canary.
Labels: TE-Verified-M71 TE-Verified-71.0.3557.0
Able to reproduce the issue on chrome version# 68.0.3440.17(Build without fix) using comment# 11
Verified the fix on Mac 10.12.6 on Chrome version# 71.0.3557.0 
Attaching screen cast for reference.
Observed "Current URL is removed from bookmarks and the Bookmarks dialog orders out"
Hence, the fix is working as expected.
Adding the verified labels.

Thanks!
712341.mp4
1.2 MB View Download
Project Member

Comment 27 by sheriffbot@chromium.org, Sep 20

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review
Please contact the 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
Labels: -Merge-Review-70 Merge-Approved-70
Project Member

Comment 29 by bugdroid1@chromium.org, Sep 21

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

commit 185042e178f10dee0659eb98ea9f1e497325949a
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Fri Sep 21 15:03:35 2018

views: use platform spacebar behavior in PageActionIconView

On Mac, the spacebar activates buttons on keydown; on other platforms it
activates them on keyup. Not implementing this behavior here caused the
following bug:

1) User focuses the bookmark bar star
2) User hits space to activate it, which opens the bubble
3) User tabs to the "Remove" button
4) User hits space to activate that button
5) The "Remove" button activates on keydown and the bubble dismisses
6) The star gets keyboard focus again
7) The star immediately handles the keyup and reopens the bubble!

The fix is for PageActionIconView to honor the platform spacebar affinity. There
is an old TODO in this code to merge it with views::Button but I would not want
to merge such a change back to beta so this small fix seems more expedient.

Bug:  712341 
Change-Id: If932928bb069493e61f78f2d34e95a0aa45fb504
Reviewed-on: https://chromium-review.googlesource.com/1230437
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592379}(cherry picked from commit 5540a9cb7ec95a28dcfb97f9ce92520799a71647)
Reviewed-on: https://chromium-review.googlesource.com/1238773
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#558}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/185042e178f10dee0659eb98ea9f1e497325949a/chrome/browser/ui/views/page_action/page_action_icon_view.cc
[modify] https://crrev.com/185042e178f10dee0659eb98ea9f1e497325949a/chrome/browser/ui/views/page_action/page_action_icon_view.h

Labels: Merge-Merged-70-refsbranch-heads3538
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/185042e178f10dee0659eb98ea9f1e497325949a
Commit: 185042e178f10dee0659eb98ea9f1e497325949a
Author: ellyjones@chromium.org
Commiter: ellyjones@chromium.org
Date: 2018-09-21 15:03:35 +0000 UTC
views: use platform spacebar behavior in PageActionIconView

On Mac, the spacebar activates buttons on keydown; on other platforms it
activates them on keyup. Not implementing this behavior here caused the
following bug:

1) User focuses the bookmark bar star
2) User hits space to activate it, which opens the bubble
3) User tabs to the "Remove" button
4) User hits space to activate that button
5) The "Remove" button activates on keydown and the bubble dismisses
6) The star gets keyboard focus again
7) The star immediately handles the keyup and reopens the bubble!

The fix is for PageActionIconView to honor the platform spacebar affinity. There
is an old TODO in this code to merge it with views::Button but I would not want
to merge such a change back to beta so this small fix seems more expedient.

Bug:  712341 
Change-Id: If932928bb069493e61f78f2d34e95a0aa45fb504
Reviewed-on: https://chromium-review.googlesource.com/1230437
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592379}(cherry picked from commit 5540a9cb7ec95a28dcfb97f9ce92520799a71647)
Reviewed-on: https://chromium-review.googlesource.com/1238773
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#558}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
Status: Fixed (was: Started)
Merge complete to M70.
Labels: TE-Verified-70.0.3538.35 TE-Verified-M70
Able to reproduce the issue on chrome version# 68.0.3440.17(Build without fix) using comment# 11
Verified the fix on Mac 10.12.6 on Chrome version# 70.0.3538.35 
Attaching screen cast for reference.
Observed "Current URL is removed from bookmarks and the Bookmarks dialog orders out"
Hence, the fix is working as expected.
Adding the verified labels.

Thanks!
712341.mp4
756 KB View Download

Sign in to add a comment