File tree Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 126126 "spatie/laravel-permission" : " Needed for nova permissions & roles" ,
127127 "vyuldashev/nova-permission" : " Needed for nova permissions & roles"
128128 }
129- }
129+ }
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -86,6 +86,15 @@ const Modal = {
8686
8787 this . trappedFocus = trap . activate ( ) ;
8888 this . trappedElement = el ;
89+
90+ window . addEventListener (
91+ "pauseFocusTrap" ,
92+ this . pauseFocusTrap . bind ( this )
93+ ) ;
94+ window . addEventListener (
95+ "resumeFocusTrap" ,
96+ this . resumeFocusTrap . bind ( this )
97+ ) ;
8998 } ,
9099
91100 releaseTrappedFocus ( ) {
@@ -96,6 +105,31 @@ const Modal = {
96105 this . trappedFocus . deactivate ( ) ;
97106 this . trappedFocus = null ;
98107 this . trappedElement = null ;
108+
109+ window . removeEventListener (
110+ "pauseFocusTrap" ,
111+ this . pauseFocusTrap . bind ( this )
112+ ) ;
113+ window . removeEventListener (
114+ "resumeFocusTrap" ,
115+ this . resumeFocusTrap . bind ( this )
116+ ) ;
117+ } ,
118+
119+ pauseFocusTrap ( ) {
120+ if ( ! this . trappedFocus ) {
121+ return ;
122+ }
123+
124+ this . trappedFocus . pause ( ) ;
125+ } ,
126+
127+ resumeFocusTrap ( ) {
128+ if ( ! this . trappedFocus ) {
129+ return ;
130+ }
131+
132+ this . trappedFocus . unpause ( ) ;
99133 } ,
100134
101135 alpine ( extraData = { } , modalName = "" , eventSettings = { } ) {
Original file line number Diff line number Diff line change 66
77use ARKEcosystem \Foundation \Fortify \Models \Concerns \HasLocalizedTimestamps ;
88use Illuminate \Database \Eloquent \Factories \HasFactory ;
9- use Illuminate \Database \Eloquent \Model ;
109use Illuminate \Database \Eloquent \Relations \MorphTo ;
1110use Illuminate \Notifications \DatabaseNotification as BaseNotification ;
1211use Illuminate \Support \Arr ;
You can’t perform that action at this time.
0 commit comments