File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,6 @@ import Timer from '../../utils/Timer.js'
345345import  Close  from  ' vue-material-design-icons/Close.vue' 
346346import  Pause  from  ' vue-material-design-icons/Pause.vue' 
347347import  Play  from  ' vue-material-design-icons/Play.vue' 
348- import  { useTrapStackControl  } from  ' ../../composables/useTrapStackControl.js' 
349348
350349export  default  {
351350	name:  ' NcModal'  
@@ -616,10 +615,6 @@ export default {
616615		}, 
617616	}, 
618617
619- 	created () { 
620- 		useTrapStackControl (() =>  this .showModal ) 
621- 	}, 
622- 
623618	beforeMount () { 
624619		window .addEventListener (' keydown' this .handleKeydown ) 
625620	}, 
Original file line number Diff line number Diff line change @@ -45,10 +45,14 @@ export function createTrapStackController() {
4545		} , 
4646		/** 
4747		 * Unpause the paused focus trap stack 
48+ 		 * If the actual stack is different from the paused one, there were changes 
49+ 		 * outside of this controller, so we assume it's self-regulated and do not unpause. 
4850		 */ 
4951		unpause ( )  { 
50- 			for  ( const  trap  of  pausedStack )  { 
51- 				trap . unpause ( ) 
52+ 			if  ( pausedStack . length  ===  getTrapStack ( ) . length )  { 
53+ 				for  ( const  trap  of  pausedStack )  { 
54+ 					trap . unpause ( ) 
55+ 				} 
5256			} 
5357			pausedStack  =  [ ] 
5458		} , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments