We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e9f650 commit 8f1ebc1Copy full SHA for 8f1ebc1
nicegui/elements/keyboard.js
@@ -2,10 +2,15 @@ export default {
2
mounted() {
3
for (const event of this.events) {
4
document.addEventListener(event, (evt) => {
5
+ // https://github.com/zauberzeug/nicegui/issues/4290
6
+ if (!(evt instanceof KeyboardEvent)) return;
7
+
8
// https://stackoverflow.com/a/36469636/3419103
9
const focus = document.activeElement;
10
if (focus && this.ignore.includes(focus.tagName.toLowerCase())) return;
11
12
if (evt.repeat && !this.repeating) return;
13
14
this.$emit("key", {
15
action: event,
16
altKey: evt.altKey,
0 commit comments