mirror of
https://github.com/directus/directus.git
synced 2026-01-30 21:28:08 -05:00
clear map instead of removing letters
This commit is contained in:
@@ -18,13 +18,10 @@ document.body.addEventListener('keyup', (event: KeyboardEvent) => {
|
||||
const key = mapKeys(event.key);
|
||||
|
||||
// This is a fix for mac not emitting a keyUp event on letters when meta is pressed: https://stackoverflow.com/questions/11818637
|
||||
if(key === 'meta') {
|
||||
for(let i = 0; i < 26; i++) {
|
||||
const letter = (i + 10).toString(36)
|
||||
keysdown.delete(letter)
|
||||
keysdown.delete(letter.toUpperCase())
|
||||
}
|
||||
if (key === 'meta') {
|
||||
keysdown.clear();
|
||||
}
|
||||
|
||||
keysdown.delete(key.toLowerCase());
|
||||
keysdown.delete(key.toUpperCase());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user