mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 05:57:54 +00:00
Fix toast on Firefox (#3239)
This commit is contained in:
parent
d14c6125da
commit
1eee186e79
@ -35,13 +35,18 @@ class NotificationManager extends LitElement {
|
|||||||
|
|
||||||
@query("ha-toast") private _toast!: HaToast;
|
@query("ha-toast") private _toast!: HaToast;
|
||||||
|
|
||||||
public showDialog({
|
public async showDialog({
|
||||||
message,
|
message,
|
||||||
action,
|
action,
|
||||||
duration,
|
duration,
|
||||||
dismissable,
|
dismissable,
|
||||||
}: ShowToastParams) {
|
}: ShowToastParams) {
|
||||||
const toast = this._toast;
|
let toast = this._toast;
|
||||||
|
// Can happen on initial load
|
||||||
|
if (!toast) {
|
||||||
|
await this.updateComplete;
|
||||||
|
toast = this._toast;
|
||||||
|
}
|
||||||
toast.setAttribute("dir", computeRTL(this.hass) ? "rtl" : "ltr");
|
toast.setAttribute("dir", computeRTL(this.hass) ? "rtl" : "ltr");
|
||||||
this._action = action || undefined;
|
this._action = action || undefined;
|
||||||
this._noCancelOnOutsideClick =
|
this._noCancelOnOutsideClick =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user