Merge remote-tracking branch 'fork/master' into add_device_pairing

This commit is contained in:
schlagmichdoch 2022-12-22 23:57:01 +01:00
commit 89cba33ff2

View file

@ -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]');
}