Skip to content

Commit

Permalink
fix: patchPopup calls onFocusEvent with all params (#10128)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev authored Nov 4, 2024
1 parent 4c1014c commit 8112148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/base/src/features/patchPopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ type OpenUI5Popup = {

const patchFocusEvent = (Popup: OpenUI5Popup) => {
const origFocusEvent = Popup.prototype.onFocusEvent;
Popup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {
Popup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent, ...rest) {
const isTypeFocus = e.type === "focus" || e.type === "activate";
const target = e.target as HTMLElement;
if (!isTypeFocus || !target.closest("[ui5-popover],[ui5-responsive-popover],[ui5-dialog]")) {
origFocusEvent.call(this, e);
origFocusEvent.call(this, e, ...rest);
}
};
};
Expand Down

0 comments on commit 8112148

Please sign in to comment.