mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 05:46:35 +00:00
Dismiss dialog if the user clicks outside it or hit the escape button (#6741)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
d8e88bc58d
commit
78a1e45be2
@ -90,7 +90,14 @@ export class DialogHassioNetwork extends LitElement implements HassDialog {
|
||||
}
|
||||
|
||||
return html`
|
||||
<ha-dialog open .heading=${true} hideActions @closed=${this.closeDialog}>
|
||||
<ha-dialog
|
||||
open
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
.heading=${true}
|
||||
hideActions
|
||||
@closed=${this.closeDialog}
|
||||
>
|
||||
<div slot="heading">
|
||||
<ha-header-bar>
|
||||
<span slot="title">
|
||||
|
@ -55,9 +55,9 @@ class DialogBox extends LitElement {
|
||||
return html`
|
||||
<ha-dialog
|
||||
open
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
@close=${this._close}
|
||||
?scrimClickAction=${this._params.prompt}
|
||||
?escapeKeyAction=${this._params.prompt}
|
||||
@closed=${this._dismiss}
|
||||
.heading=${this._params.title
|
||||
? this._params.title
|
||||
: this._params.confirmation &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user