forked from noxious/client
Don't open GM panel if focus is on any input or textarea
This commit is contained in:
parent
85d64f23eb
commit
7871b34c60
@ -49,8 +49,8 @@ addEventListener('click', (event) => {
|
||||
addEventListener('keydown', (event) => {
|
||||
if (gameStore.character?.role !== 'gm') return // Only allow toggling the gm panel if the character is a gm
|
||||
|
||||
// Check if no input is active
|
||||
if (event.repeat || event.isComposing || event.defaultPrevented) return
|
||||
// Check if no input is active or focus is on an input
|
||||
if (event.repeat || event.isComposing || event.defaultPrevented || document.activeElement?.tagName.toUpperCase() === 'INPUT' || document.activeElement?.tagName.toUpperCase() === 'TEXTAREA') return
|
||||
|
||||
if (event.key === 'G') {
|
||||
gameStore.toggleGmPanel()
|
||||
|
Loading…
x
Reference in New Issue
Block a user