Skip to content

Commit

Permalink
fix(ui5-button): adjust ui5-button menu button samples to use open/op…
Browse files Browse the repository at this point in the history
…ener

MenuButton samples were published while open/opener wasn't introduced for ui5-menu. Now these samples (Dev and Playground) are fixed to work with open/opener.
  • Loading branch information
NHristov-sap committed May 29, 2024
1 parent a142caf commit 974ff8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/main/test/pages/Button.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@
});

function showMenu(target) {
menu.showAt(target);
menu.opener = target;
menu.open = true;
}

menuButtonText.addEventListener("click", function(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ myMenu.addEventListener("close", function() {

function openMenu(menu, opener) {
opener.accessibilityAttributes.expanded = true;
menu.showAt(opener);
menu.opener = opener;
menu.open = true;
}

function closeMenu(opener) {
Expand Down

0 comments on commit 974ff8c

Please sign in to comment.