keys: prevent default browser actions (#547)

This commit is contained in:
bordun 2019-07-25 15:11:41 +02:00
parent 508c5efc04
commit 886edf430f
2 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 0.47.4
- bug fixes
- keys: prevent default browser actions when a combo is bound to a widget (for example print dialog with ctrl+p)
## 0.47.3
- bug fixes

View file

@ -83,6 +83,8 @@ class Keys extends Widget {
if (!this.getProp('repeat') && e) e.preventRepeat()
e.preventDefault()
if (this.getProp('keydown') !== '') {
var context = {
@ -112,6 +114,8 @@ class Keys extends Widget {
if (e.target && e.target.classList.contains('no-keybinding')) return
e.preventDefault()
if (this.getProp('keyup') !== '') {
var context = {