Non-Regression: Unnecessary context menu is seen even though no option in the menu is enabled in files app window |
||||
Issue descriptionChrome Version: 73.0.3644.0/11473.0.0 dev channel Blaze,Jerry,Wolf OS: Chrome OS Pre-Condition:Make sure no files are there in files app What steps will reproduce the problem? (1)Sign-in to user>> Navigate to chrome://settings/downloads (2)In Location section, click on Change button and in files app window, click on Downloads folder, then right click in files app window and observe Unnecessary context menu is seen even though no option in the menu is enabled Actual: Unnecessary context menu is seen even though no option in the menu is enabled in files app window Expected: As no option is enabled, right clicking on files app window, context menu should not be seen This is a Non-Regression issue seen from M62 Attaching screencast for reference..
,
Jan 14
Assigning to alex who has good recent context menu knowledge.
,
Jan 15
Existing context menu code in WebUI uses 'hasVisibleItems()' to inhibit menus being shown if no 'cr-menu-item' elements have visibility set. In this case, we have a menu with all items disabled. We can detect this in FilesApp and prevent the event from propagating, since it might be possible other users of WebUI will still want to show a menu with all disabled items even if we don't
,
Jan 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8cea8062679fc61e206eca3bfb8eb5ea08ddfc99 commit 8cea8062679fc61e206eca3bfb8eb5ea08ddfc99 Author: Alex Danilo <adanilo@chromium.org> Date: Wed Jan 16 05:58:33 2019 Don't show context menu with nothing actionable. In some cases, the context menu gets populated with entries that are disabled, and so showing the menu gives the user nothing to click (or tap) on. The WebUI code for menus includes logic to suppress the menu being shown if all the menu items are set to 'hidden', or have a display value of 'none' but the menu will still show if it contains items that are disabled. The change checks for a menu containing nothing actionable and stops the display of the context menu in that case. Bug: 917975 Tests: Ran all browser and unit tests. Manually verified also. Change-Id: I7f9d338cab7e3c5fb78aae67e98edb8ce45dd9f8 Reviewed-on: https://chromium-review.googlesource.com/c/1410952 Reviewed-by: Joel Hockey <joelhockey@chromium.org> Commit-Queue: Alex Danilo <adanilo@chromium.org> Cr-Commit-Position: refs/heads/master@{#623127} [modify] https://crrev.com/8cea8062679fc61e206eca3bfb8eb5ea08ddfc99/chrome/browser/chromeos/file_manager/file_manager_jstest.cc [modify] https://crrev.com/8cea8062679fc61e206eca3bfb8eb5ea08ddfc99/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn [modify] https://crrev.com/8cea8062679fc61e206eca3bfb8eb5ea08ddfc99/ui/file_manager/file_manager/foreground/js/ui/list_container.js [add] https://crrev.com/8cea8062679fc61e206eca3bfb8eb5ea08ddfc99/ui/file_manager/file_manager/foreground/js/ui/list_container_unittest.js
,
Jan 16
(6 days ago)
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dpa...@chromium.org
, Jan 3