From 721f2a4f4a24ba9941156bd6d3048c154dd55697 Mon Sep 17 00:00:00 2001 From: Peter Kaske Date: Wed, 23 Mar 2022 23:46:26 +0100 Subject: [PATCH] Fix naming. --- package.json | 2 +- tp-popup.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ce5333f..7ee495b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-popup", - "version": "1.0.3", + "version": "1.0.4", "description": "", "main": "tp-popup.js", "scripts": { diff --git a/tp-popup.js b/tp-popup.js index 7708065..3ed55fa 100644 --- a/tp-popup.js +++ b/tp-popup.js @@ -163,15 +163,15 @@ class TpPopup extends EventHelpers(Position(DomQuery(LitElement))) { } _docClick(e) { - const isThisPopover = e.composedPath().indexOf(this) > -1; - if (!isThisPopover && this.isOpen) { + const isThisPopup = e.composedPath().indexOf(this) > -1; + if (!isThisPopup && this.isOpen) { this.close(); } } _onClick(e) { const toggle = closest(e.composedPath()[0], '[slot="toggle"]', true) === this.toggleEl; - const closePopover = closest(e.composedPath()[0], '[close-popover]', true); + const closePopup = closest(e.composedPath()[0], '[close-popup]', true); if (toggle && this.toggleEl.hasAttribute('disabled')) return; @@ -179,7 +179,7 @@ class TpPopup extends EventHelpers(Position(DomQuery(LitElement))) { this.toggle(); } - if (closePopover) { + if (closePopup) { this.close(); } }