| commit | e981247c811490486dba640143401d047380d13c | [log] [tgz] |
|---|---|---|
| author | Bradley Peters <brpeters@microsoft.com> | Fri May 09 17:18:33 2025 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri May 09 17:18:33 2025 |
| tree | acfe14b2e056d7a4abf11ae669d1c1fece8a68b7 | |
| parent | 6382c4fcf634fe0d548f1a0afc52e9d01de797e2 [diff] |
Reland "Fix context menu not dismissing when window moves with Win+Shift+Arrow" This is a reland of commit 14045a2f04d9836ea9bd39477ffcdd96f374747b This contains the original change, plus a fix for a crash that occurred on Mac when invoking a menu while in immersive fullscreen. A similar change commit c08a424435edeb00c5a539a6ae38f380adc56548 attempted to fix this issue, but isn't a complete fix. It will be reverted once this CL lands. It attempts to listen to the key press events, but Win+Shift+Arrow is an OS special key combination which is eaten by the OS. This means the application never receives the key down for arrow when Win and Shift are already pressed. So the other CL is relying on the key up event. If the user releases Win or Shift keys before releasing the arrow key, then the context menu is not dismissed even though the browser window moves. Additionally, it doesn't handle up and down keys, it doesn't handle if the window is moved with Win+Arrow (no shift), and on single monitor displays, Win+Shift+Arrow does not move the browser window, but the other CL still closes the context menu. Using browser window move to dismiss the menu matches the behavior of existing UI like Datalist dropdown and select dropdown, which dismiss themselves when the browser window moves. Original change's description: > Fix context menu not dismissing when window moves with Win+Shift+Arrow > > The existing Destroying and ShowStateChanged callbacks, that > MenuController uses to cancel currently showing menus, don't handle the > case where the user moves the browser window using the keyboard shortcut > Win+Shift+Arrow. Adding a callback for BoundsChanged to cancel current > menus will handle the scenario where the user moves the browser window > with the keyboard. > > Bug: 394634481 > Change-Id: I8fcceb209dbd376eda8a683525dcfb891d364a40 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6244522 > Reviewed-by: Dana Fried <dfried@chromium.org> > Commit-Queue: Brad Peters <brpeters@microsoft.com> > Reviewed-by: Alison Gale <agale@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1427428} Bug: 394634481 Change-Id: If1ef4efb3a6d37be121d57a098daa4a2800c3348 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6474359 Reviewed-by: Dana Fried <dfried@chromium.org> Commit-Queue: Brad Peters <brpeters@microsoft.com> Reviewed-by: Liang Zhao <lzhao@microsoft.com> Reviewed-by: Alison Gale <agale@chromium.org> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1458197}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.