Skip to content

Commit 06e5dd2

Browse files
authored
Merge pull request #272 from microsoftgraph/nmetulev/mgt-login-popup-fix
Fixed issue with mgt-login popup not opening
2 parents e25c6d7 + 5006446 commit 06e5dd2

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)