mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix keyboard shortcuts not to trigger on AltGr key (#5566)
On Windows when pressing AltGr it will trigger event with same properties as left Ctrl key. Check explicitly that altKey is false otherwise on some keyboard layouts input of special characters is blocked.
This commit is contained in:
committed by
Joram Wilander
parent
fa04d2bf3a
commit
fa75e0e7c4
@@ -32,7 +32,7 @@ export function isMac() {
|
||||
}
|
||||
|
||||
export function cmdOrCtrlPressed(e) {
|
||||
return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey);
|
||||
return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey && !e.altKey);
|
||||
}
|
||||
|
||||
export function isInRole(roles, inRole) {
|
||||
|
||||
Reference in New Issue
Block a user