@@ -97,11 +97,11 @@ let JS = {
9797 } ,
9898
9999 exec_focus ( e , eventType , phxEvent , view , sourceEl , el ) {
100- window . requestAnimationFrame ( ( ) => ARIA . attemptFocus ( el ) )
100+ ARIA . attemptFocus ( el )
101101 } ,
102102
103103 exec_focus_first ( e , eventType , phxEvent , view , sourceEl , el ) {
104- window . requestAnimationFrame ( ( ) => ARIA . focusFirstInteractive ( el ) || ARIA . focusFirst ( el ) )
104+ ARIA . focusFirstInteractive ( el ) || ARIA . focusFirst ( el )
105105 } ,
106106
107107 exec_push_focus ( e , eventType , phxEvent , view , sourceEl , el ) {
@@ -219,18 +219,14 @@ let JS = {
219219 }
220220 } else {
221221 if ( this . isVisible ( el ) ) {
222- window . requestAnimationFrame ( ( ) => {
223- el . dispatchEvent ( new Event ( "phx:hide-start" ) )
224- DOM . putSticky ( el , "toggle" , currentEl => currentEl . style . display = "none" )
225- el . dispatchEvent ( new Event ( "phx:hide-end" ) )
226- } )
222+ el . dispatchEvent ( new Event ( "phx:hide-start" ) )
223+ DOM . putSticky ( el , "toggle" , currentEl => currentEl . style . display = "none" )
224+ el . dispatchEvent ( new Event ( "phx:hide-end" ) )
227225 } else {
228- window . requestAnimationFrame ( ( ) => {
229- el . dispatchEvent ( new Event ( "phx:show-start" ) )
230- let stickyDisplay = display || this . defaultDisplay ( el )
231- DOM . putSticky ( el , "toggle" , currentEl => currentEl . style . display = stickyDisplay )
232- el . dispatchEvent ( new Event ( "phx:show-end" ) )
233- } )
226+ el . dispatchEvent ( new Event ( "phx:show-start" ) )
227+ let stickyDisplay = display || this . defaultDisplay ( el )
228+ DOM . putSticky ( el , "toggle" , currentEl => currentEl . style . display = stickyDisplay )
229+ el . dispatchEvent ( new Event ( "phx:show-end" ) )
234230 }
235231 }
236232 } ,
0 commit comments