thelounge/client/dist/js/helpers/isIgnoredKeybind.js

12 lines
427 B
JavaScript
Raw Normal View History

2022-05-02 09:50:13 +02:00
"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;
};
//# sourceMappingURL=isIgnoredKeybind.js.map