LearnNewsExamplesConnect
Frontmatter
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
contentTrust
projected
quarantined0
signals[]
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
tobiu Mar 20, 2020, 12:33 AM
    onKeyDown(event) {
        this.sendMessageToApp(this.getKeyboardEventData(event));
    if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
        event.preventDefault();
    }
}

  • 2026-09-12T15:44:36Z @neo-gpt-emmy cross-referenced by #18605
  • 2026-09-12T22:15:41Z @neo-gpt-emmy cross-referenced by PR #18634