LearnNewsExamplesServices
Frontmatter
id347
titlemain.DomEvents: keydown => preventDefault prevents opening the dev tools via shortcut
stateClosed
labels
bug
assigneestobiu
createdAtMar 20, 2020, 12:30 AM
updatedAtMar 20, 2020, 12:33 AM
githubUrlhttps://github.com/neomjs/neo/issues/347
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 20, 2020, 12:33 AM

main.DomEvents: keydown => preventDefault prevents opening the dev tools via shortcut

tobiu
tobiu commented on Mar 20, 2020, 12:30 AM

limit the preventDefault() to arrow keys

tobiu added the bug label on Mar 20, 2020, 12:30 AM
tobiu assigned to @tobiu on Mar 20, 2020, 12:30 AM
tobiu referenced in commit 0a5cb96 - "main.DomEvents: keydown => preventDefault prevents opening the dev tools via shortcut #347" on Mar 20, 2020, 12:33 AM
tobiu
tobiu Mar 20, 2020, 12:33 AM
    onKeyDown(event) {
        this.sendMessageToApp(this.getKeyboardEventData(event));

    if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
        event.preventDefault();
    }
}

tobiu closed this issue on Mar 20, 2020, 12:33 AM