stopping key listener when role modal is open

This commit is contained in:
Dave 2023-05-27 18:19:40 +01:00
parent 274ddbbdfd
commit 6ed2d1e109

View file

@ -87,7 +87,7 @@ export default {
Gradients,
},
computed: {
...mapState(["grimoire", "session"]),
...mapState(["grimoire", "session", "modals"]),
...mapState("players", ["players"]),
},
data() {
@ -97,7 +97,7 @@ export default {
},
methods: {
keyup({ key, ctrlKey, metaKey }) {
if (ctrlKey || metaKey || true) return;
if (ctrlKey || metaKey || this.modals.role) return;
switch (key.toLocaleLowerCase()) {
case "g":
this.$store.commit("toggleGrimoire");