New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729939 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Not on Chrome
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 658980



Sign in to add a comment

[MD Bookmarks] Up/down arrows in item context menus don't work

Project Member Reported by tsergeant@chromium.org, Jun 6 2017

Issue description

Pressing up/down with the MD Bookmarks context menu open causes

Uncaught TypeError: Cannot read property 'disabled' of undefined
    at HTMLDialogElement.getNextOption_ (cr_action_menu.js:233)
    at HTMLDialogElement.onKeyDown_ (cr_action_menu.js:175)
    at HTMLDialogElement.handler (polymer-extracted.js:491)

This seems to be because cr-action-menu only reads the dropdown-item elements during attached(), but <bookmarks-command-manager> uses a dom-repeat to stamp its items, which will not be finished when the menu is attached.
 
Owner: tsergeant@chromium.org
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 21 2017

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

commit 897ac00a9fb5cfd337069fe821d12268dfbde7d5
Author: Tim Sergeant <tsergeant@chromium.org>
Date: Wed Jun 21 03:17:48 2017

MD WebUI: Support dynamically added menu items in cr-action-menu

The cr-action-menu element previously cached its child elements during
attached. This was causing errors in MD Bookmarks, which has a
action-menu which stamps its children in a dom-repeat (which will happen
asynchronously after attached).

This CL removes the cache so that cr-action-menu checks its children
during keyboard navigation. This allows items to be added and removed
dynamically while preserving correct keyboard navigation.

Bug:  729939 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5b438d06a1e711c3f943b17d0e495ef557eec5c7
Reviewed-on: https://chromium-review.googlesource.com/528033
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481099}
[modify] https://crrev.com/897ac00a9fb5cfd337069fe821d12268dfbde7d5/chrome/test/data/webui/cr_elements/cr_action_menu_test.js
[modify] https://crrev.com/897ac00a9fb5cfd337069fe821d12268dfbde7d5/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js

Status: Fixed (was: Started)

Sign in to add a comment