Merge remote-tracking branch 'fork/master' into add_device_pairing
This commit is contained in:
commit
89cba33ff2
1 changed files with 7 additions and 0 deletions
|
@ -222,6 +222,13 @@ class Dialog {
|
|||
constructor(id) {
|
||||
this.$el = $(id);
|
||||
this.$el.querySelectorAll('[close]').forEach(el => el.addEventListener('click', e => this.hide()))
|
||||
this.$el.querySelectorAll('[role="textbox"]').forEach((el) => {
|
||||
el.addEventListener("keypress", (e) => {
|
||||
if (e.key == "Escape") {
|
||||
this.hide();
|
||||
}
|
||||
});
|
||||
})
|
||||
this.$autoFocus = this.$el.querySelector('[autofocus]');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue