Keep focus on the original place when closing menu by mouse or touchscreen.
This will also affect other UI elements derived from cr.ui.MenuButton like: - Combo Button - Context Menu Button The UI elements are also referred in other places than the Files app. - "Apps" menu in login screen - media control UI in the video player - Bookmark Manager The button is made not to steal the focus when clicking it to open menu, https://cs.chromium.org/chromium/src/ui/webui/resources/js/cr/ui/menu_button.js?q=file:menu_button.js+stealing+focus&sq=package:chromium&dr&l=139 however, it had taken focus when the menu item is activated by a click. It made the focus left on the button after finishing operation on a button using either mouse or touchscreen, requiring MenuButton class to hide that focus highlight by attaching "using-mouse" class attribute. Test: browser_tests --gtest_filter=WebUIResourceBrowserTest.MenuButtonTest* Bug: 771024,769593 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I23fb1b0ce907a21407ffca514032bfdc083e36de Reviewed-on: https://chromium-review.googlesource.com/816376 Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org> Reviewed-by:Michael Giuffrida <michaelpg@chromium.org> Cr-Commit-Position: refs/heads/master@{#523331}
Showing
Please register or sign in to comment