mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-02 22:02:19 +02:00
13 lines
384 B
JavaScript
13 lines
384 B
JavaScript
|
"use strict";
|
||
|
|
||
|
export default (event) => {
|
||
|
if (event.target.tagName !== "TEXTAREA" && event.target.tagName !== "INPUT") {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// If focus is in a textarea, do not handle keybinds if user has typed anything
|
||
|
// This is done to prevent keyboard layout binds conflicting with ours
|
||
|
// For example alt+shift+left on macos selects a word
|
||
|
return !!event.target.value;
|
||
|
};
|