@@ -13,13 +13,13 @@ type OpenUI5Popup = {
1313 _closed : ( ...args : any [ ] ) => void ,
1414 getOpenState : ( ) => "CLOSED" | "CLOSING" | "OPEN" | "OPENING" ,
1515 getContent : ( ) => Control | HTMLElement | null , // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)
16- onFocusEvent : ( e : FocusEvent ) => void ,
16+ onFocusEvent : ( ... args : any [ ] ) => void ,
1717 }
1818} ;
1919
2020type OpenUI5PopupBasedControl = {
2121 prototype : {
22- onsapescape : ( e : Event ) => void ,
22+ onsapescape : ( ... args : any [ ] ) => void ,
2323 oPopup : OpenUI5Popup ,
2424 }
2525} ;
@@ -93,12 +93,12 @@ const isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean =>
9393
9494const patchPopupBasedControl = ( PopupBasedControl : OpenUI5PopupBasedControl ) => {
9595 const origOnsapescape = PopupBasedControl . prototype . onsapescape ;
96- PopupBasedControl . prototype . onsapescape = function onsapescape ( e : Event ) {
96+ PopupBasedControl . prototype . onsapescape = function onsapescape ( ... args : any [ ] ) {
9797 if ( hasWebComponentPopupAbove ( this . oPopup ) ) {
9898 return ;
9999 }
100100
101- origOnsapescape . call ( this , e ) ;
101+ origOnsapescape . apply ( this , args ) ;
102102 } ;
103103} ;
104104
@@ -141,9 +141,9 @@ const patchClosed = (Popup: OpenUI5Popup) => {
141141
142142const patchFocusEvent = ( Popup : OpenUI5Popup ) => {
143143 const origFocusEvent = Popup . prototype . onFocusEvent ;
144- Popup . prototype . onFocusEvent = function onFocusEvent ( e : FocusEvent ) {
144+ Popup . prototype . onFocusEvent = function onFocusEvent ( ... args : any [ ] ) {
145145 if ( ! hasWebComponentPopupAbove ( this ) ) {
146- origFocusEvent . call ( this , e ) ;
146+ origFocusEvent . apply ( this , args ) ;
147147 }
148148 } ;
149149} ;
0 commit comments