Fix the stats for nerds modal hogging all the keyboard events (#2253)
This commit is contained in:
		
							parent
							
								
									d34720aeb3
								
							
						
					
					
						commit
						32b9e1d511
					
				| 
						 | 
				
			
			@ -1439,6 +1439,13 @@ export default Vue.extend({
 | 
			
		|||
        temporary: false,
 | 
			
		||||
        pauseOnOpen: false
 | 
			
		||||
      })
 | 
			
		||||
      this.statsModal.handleKeyDown_ = (event) => {
 | 
			
		||||
        // the default handler prevents keyboard events propagating beyond the modal
 | 
			
		||||
        // the modal should only handle the escape and tab key, all others should be handled by the player
 | 
			
		||||
        if (event.key === 'Escape' || event.key === 'Tab') {
 | 
			
		||||
          this.statsModal.handleKeyDown(event)
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      this.player.addChild(this.statsModal)
 | 
			
		||||
      this.statsModal.el_.classList.add('statsModal')
 | 
			
		||||
      this.statsModal.on('modalclose', () => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue