Skip to content

Commit

Permalink
Fix closing popup by clicking on backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
DBuit committed Oct 19, 2022
1 parent 3543c29 commit a8ac5f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 52 deletions.
60 changes: 10 additions & 50 deletions dist/light-popup-card.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/light-popup-card.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { LitElement, html, css } from "lit-element";
import tinycolor, { TinyColor, isReadable } from "@ctrl/tinycolor";
import { closePopUp } from "card-tools/src/popup";
import { fireEvent } from "card-tools/src/event";
import { provideHass } from "card-tools/src/hass";
import { createCard } from "card-tools/src/lovelace-element.js";
Expand Down Expand Up @@ -367,7 +366,15 @@ class LightPopupCard extends LitElement {
(event.target.className.includes("popup-inner") ||
event.target.className.includes("settings-inner"))
) {
closePopUp();
const action = {
browser_mod: {
service: "browser_mod.close_popup",
data: {
browser_id: 'THIS'
}
}
}
fireEvent("ll-custom", action);
}
}

Expand Down

0 comments on commit a8ac5f9

Please sign in to comment.