Skip to content

Commit

Permalink
fix(core/modal): fixed closing modal issue when press space or enter (#…
Browse files Browse the repository at this point in the history
…1080)

Co-authored-by: Demirci <ridvan.demirci@siemens.com>
  • Loading branch information
ridvandmrc and Demirci authored Feb 20, 2024
1 parent fcd668b commit 214012f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export class Modal {
}

private onModalClick(event: MouseEvent) {
if (event.target !== this.dialog) return;

const rect = this.dialog.getBoundingClientRect();
const isClickOutside =
rect.top <= event.clientY &&
Expand Down

0 comments on commit 214012f

Please sign in to comment.