keys: prevent default browser actions (#547)
This commit is contained in:
parent
508c5efc04
commit
886edf430f
2 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue