Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-menu): restore focus to the opener #9041

Merged
merged 22 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/main/src/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import ResponsivePopover from "./ResponsivePopover.js";
import type { ResponsivePopoverBeforeCloseEventDetail } from "./ResponsivePopover.js";
import Button from "./Button.js";
import List from "./List.js";
import Icon from "./Icon.js";
import BusyIndicator from "./BusyIndicator.js";
import MenuItem from "./MenuItem.js";
import type {
Expand Down Expand Up @@ -89,7 +88,6 @@ type MenuBeforeCloseEventDetail = { escPressed: boolean };
Button,
List,
MenuItem,
Icon,
BusyIndicator,
],
})
Expand Down Expand Up @@ -379,6 +377,7 @@ class Menu extends UI5Element {
_afterPopoverClose() {
this.open = false;
this.fireEvent("close", {}, false, true);
this._popover.getOpenerHTMLElement(this._popover.opener)?.focus();
}
}

Expand Down