@@ -2831,21 +2831,28 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
2831
2831
view . liveSocket . pushHistoryPatch ( e , href , replace ? "replace" : "push" , sourceEl ) ;
2832
2832
} ,
2833
2833
exec_focus ( e , eventType , phxEvent , view , sourceEl , el ) {
2834
- window . requestAnimationFrame ( ( ) => aria_default . attemptFocus ( el ) ) ;
2834
+ aria_default . attemptFocus ( el ) ;
2835
+ window . requestAnimationFrame ( ( ) => {
2836
+ window . requestAnimationFrame ( ( ) => aria_default . attemptFocus ( el ) ) ;
2837
+ } ) ;
2835
2838
} ,
2836
2839
exec_focus_first ( e , eventType , phxEvent , view , sourceEl , el ) {
2837
- window . requestAnimationFrame ( ( ) => aria_default . focusFirstInteractive ( el ) || aria_default . focusFirst ( el ) ) ;
2840
+ aria_default . focusFirstInteractive ( el ) || aria_default . focusFirst ( el ) ;
2841
+ window . requestAnimationFrame ( ( ) => {
2842
+ window . requestAnimationFrame ( ( ) => aria_default . focusFirstInteractive ( el ) || aria_default . focusFirst ( el ) ) ;
2843
+ } ) ;
2838
2844
} ,
2839
2845
exec_push_focus ( e , eventType , phxEvent , view , sourceEl , el ) {
2840
- window . requestAnimationFrame ( ( ) => focusStack . push ( el || sourceEl ) ) ;
2846
+ focusStack . push ( el || sourceEl ) ;
2841
2847
} ,
2842
2848
exec_pop_focus ( _e , _eventType , _phxEvent , _view , _sourceEl , _el ) {
2843
- window . requestAnimationFrame ( ( ) => {
2844
- const el = focusStack . pop ( ) ;
2845
- if ( el ) {
2846
- el . focus ( ) ;
2847
- }
2848
- } ) ;
2849
+ const el = focusStack . pop ( ) ;
2850
+ if ( el ) {
2851
+ el . focus ( ) ;
2852
+ window . requestAnimationFrame ( ( ) => {
2853
+ window . requestAnimationFrame ( ( ) => el . focus ( ) ) ;
2854
+ } ) ;
2855
+ }
2849
2856
} ,
2850
2857
exec_add_class ( e , eventType , phxEvent , view , sourceEl , el , { names, transition, time, blocking } ) {
2851
2858
this . addOrRemoveClasses ( el , names , [ ] , transition , time , view , blocking ) ;
@@ -2919,11 +2926,13 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
2919
2926
}
2920
2927
let onStart = ( ) => {
2921
2928
this . addOrRemoveClasses ( el , inStartClasses , outClasses . concat ( outStartClasses ) . concat ( outEndClasses ) ) ;
2922
- let stickyDisplay = display || this . defaultDisplay ( el ) ;
2923
- dom_default . putSticky ( el , "toggle" , ( currentEl ) => currentEl . style . display = stickyDisplay ) ;
2929
+ const stickyDisplay = display || this . defaultDisplay ( el ) ;
2924
2930
window . requestAnimationFrame ( ( ) => {
2925
2931
this . addOrRemoveClasses ( el , inClasses , [ ] ) ;
2926
- window . requestAnimationFrame ( ( ) => this . addOrRemoveClasses ( el , inEndClasses , inStartClasses ) ) ;
2932
+ window . requestAnimationFrame ( ( ) => {
2933
+ dom_default . putSticky ( el , "toggle" , ( currentEl ) => currentEl . style . display = stickyDisplay ) ;
2934
+ this . addOrRemoveClasses ( el , inEndClasses , inStartClasses ) ;
2935
+ } ) ;
2927
2936
} ) ;
2928
2937
} ;
2929
2938
let onEnd = ( ) => {
0 commit comments