Frontmatter
| id | 347 |
| title | main.DomEvents: keydown => preventDefault prevents opening the dev tools via shortcut |
| state | Closed |
| labels | bug |
| assignees | tobiu |
| createdAt | Mar 20, 2020, 12:30 AM |
| updatedAt | Mar 20, 2020, 12:33 AM |
| githubUrl | https://github.com/neomjs/neo/issues/347 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 20, 2020, 12:33 AM |
main.DomEvents: keydown => preventDefault prevents opening the dev tools via shortcut
tobiu assigned to @tobiu on Mar 20, 2020, 12:30 AM

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
limit the preventDefault() to arrow keys