When context menu have no items error is showed: TypeError: Cannot read property '0' of undefined
More details from exception:
vaadin-list-mixin.html:193 Uncaught TypeError: Cannot read property '0' of undefined
at HTMLElement.focus (vaadin-list-mixin.html:193)
at HTMLElement._onVaadinOverlayOpen (vaadin-context-menu.html:394)
at HTMLElement.handler (template-stamp.html:96)
at HTMLElement.Polymer.RenderStatus.afterNextRender (vaadin-overlay.html:546)
at callMethod (render-status.html:51)
at runQueue (render-status.html:42)
at render-status.html:29
Looks like in before calling child.focus() at vaadin-context-menu.html:394 check
that child.items[0] is defined missing.
How to reproduse
Create context menu with no item.
bind it to target
right click on target
Span contextTarget = new Span("Context menu target");
ContextMenu menu = new ContextMenu(contextTarget);
add(contextTarget);
When context menu have no items error is showed:
TypeError: Cannot read property '0' of undefined
More details from exception:Looks like in before calling child.focus() at
vaadin-context-menu.html:394
check that child.items[0] is defined missing.How to reproduse