diff options
author | Jonni Madekivi <jonni@egarden.fi> | 2018-12-17 09:43:37 +0200 |
---|---|---|
committer | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2018-12-17 09:43:37 +0200 |
commit | 5ad9dbf519d131e69f3b9c5a3fdf73d0e96011e0 (patch) | |
tree | fbae75c4561a8817bedc38e5c85e3e66320f1e76 /client | |
parent | c9c960ee57c54d2a1d3b6572cc91b73cb561ac60 (diff) | |
download | vaadin-framework-5ad9dbf519d131e69f3b9c5a3fdf73d0e96011e0.tar.gz vaadin-framework-5ad9dbf519d131e69f3b9c5a3fdf73d0e96011e0.zip |
Prevent IndexOutOfBoundException in VMenuBar.CustomMenuItem (#11285)
* Fixes #10814
* Add missing tests
Fixes #11374
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VMenuBar.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java index a652cf79fd..2d4f35a2ad 100644 --- a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java +++ b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java @@ -903,6 +903,7 @@ public class VMenuBar extends FocusableFlowPanel implements super.onLoad(); if (getParentMenu() != null && getParentMenu().getParentMenu() == null + && getParentMenu().getItems().size() >= 1 && getParentMenu().getItems().get(0).equals(this)) { getElement().setAttribute("tabindex", "0"); } else { |