Merge pull request #3720 from thelounge/xpaw/fix-3719
Ignore Alt+<letter> keybinds when focused in chat input
This commit is contained in:
commit
a9bad593b0
@ -71,11 +71,27 @@ export default {
|
|||||||
clearTimeout(this.dayChangeTimeout);
|
clearTimeout(this.dayChangeTimeout);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleSidebar() {
|
toggleSidebar(e) {
|
||||||
|
// Do not handle this keybind in the chat input because
|
||||||
|
// it can be used to type letters with umlauts
|
||||||
|
if (e.target.tagName === "TEXTAREA") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.commit("toggleSidebar");
|
this.$store.commit("toggleSidebar");
|
||||||
|
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
toggleUserList() {
|
toggleUserList(e) {
|
||||||
|
// Do not handle this keybind in the chat input because
|
||||||
|
// it can be used to type letters with umlauts
|
||||||
|
if (e.target.tagName === "TEXTAREA") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.commit("toggleUserlist");
|
this.$store.commit("toggleUserlist");
|
||||||
|
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
msUntilNextDay() {
|
msUntilNextDay() {
|
||||||
// Compute how many milliseconds are remaining until the next day starts
|
// Compute how many milliseconds are remaining until the next day starts
|
||||||
|
@ -71,7 +71,15 @@ Mousetrap.bind(["alt+shift+up", "alt+shift+down"], function(e, keys) {
|
|||||||
|
|
||||||
// Jump to the first window with a highlight in it, or the first with unread
|
// Jump to the first window with a highlight in it, or the first with unread
|
||||||
// activity if there are none with highlights.
|
// activity if there are none with highlights.
|
||||||
Mousetrap.bind(["alt+a"], function() {
|
Mousetrap.bind(["alt+a"], function(e) {
|
||||||
|
// Do not handle this keybind in the chat input because
|
||||||
|
// it can be used to type letters with umlauts
|
||||||
|
// Normally this is not required, but since chat input has the "mousetrap"
|
||||||
|
// class for other keybinds to work, we need to add this check
|
||||||
|
if (e.target.tagName === "TEXTAREA") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
let targetChannel;
|
let targetChannel;
|
||||||
|
|
||||||
outer_loop: for (const network of store.state.networks) {
|
outer_loop: for (const network of store.state.networks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user