Skip to content

Commit 44eb46a

Browse files
committed
fixed issue with mgt-login popup not opening
1 parent d22623f commit 44eb46a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/components/mgt-login/mgt-login.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export class MgtLogin extends MgtBaseComponent {
7272
*/
7373
public connectedCallback() {
7474
super.connectedCallback();
75+
this.addEventListener('click', e => e.stopPropagation());
7576
window.addEventListener('click', this.handleWindowClick);
7677
}
7778

@@ -199,16 +200,7 @@ export class MgtLogin extends MgtBaseComponent {
199200
}
200201

201202
private handleWindowClick(e: MouseEvent) {
202-
if (e.target === this) {
203-
return;
204-
}
205-
206-
// get popup bounds
207-
const popup = this.renderRoot.querySelector('.popup');
208-
if (popup) {
209-
this._popupRect = popup.getBoundingClientRect();
210-
this._showMenu = false;
211-
}
203+
this._showMenu = false;
212204
}
213205

214206
private renderLogIn() {

0 commit comments

Comments
 (0)