mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-26 19:14:12 +00:00 
			
		
		
		
	Improve performance
This commit is contained in:
		
							parent
							
								
									0fe0b6d254
								
							
						
					
					
						commit
						5d3fe9599b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -67,10 +67,10 @@ export default { | ||||||
| 				// flatten
 | 				// flatten
 | ||||||
| 				const reservedKeys = concat(actions.map(a => a.patterns)); | 				const reservedKeys = concat(actions.map(a => a.patterns)); | ||||||
| 
 | 
 | ||||||
| 				el.dataset.reservedKeys = JSON.stringify(reservedKeys); | 				el._misskey_reservedKeys = reservedKeys; | ||||||
| 
 | 
 | ||||||
| 				el._keyHandler = (e: KeyboardEvent) => { | 				el._keyHandler = (e: KeyboardEvent) => { | ||||||
| 					const targetReservedKeys = JSON.parse(document.activeElement ? ((document.activeElement as any).dataset || {}).reservedKeys || '[]' : '[]'); | 					const targetReservedKeys = document.activeElement ? ((document.activeElement as any)._misskey_reservedKeys || []) : []; | ||||||
| 					if (document.activeElement && ignoreElemens.some(el => document.activeElement.matches(el))) return; | 					if (document.activeElement && ignoreElemens.some(el => document.activeElement.matches(el))) return; | ||||||
| 
 | 
 | ||||||
| 					for (const action of actions) { | 					for (const action of actions) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue