From 811214859f2a1a8d5dabbfc1300a0df934774b0e Mon Sep 17 00:00:00 2001 From: Vladislav Tasev Date: Mon, 4 Nov 2024 11:32:38 +0200 Subject: [PATCH] fix: patchPopup calls onFocusEvent with all params (#10128) --- packages/base/src/features/patchPopup.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/base/src/features/patchPopup.ts b/packages/base/src/features/patchPopup.ts index cc0181a3bc76..ac0956986c40 100644 --- a/packages/base/src/features/patchPopup.ts +++ b/packages/base/src/features/patchPopup.ts @@ -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); } }; };