Skip to content

Commit

Permalink
Merge pull request #1197 from Infineon/1189-modal-problem-with-render…
Browse files Browse the repository at this point in the history
…ing-lines

Modal: Fix issue with rendering lines
  • Loading branch information
tishoyanchev authored Apr 26, 2024
2 parents de8ce93 + 481ef7c commit c30e84e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions packages/components/src/components/modal/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

.modal-container {
display: none;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
Expand All @@ -19,7 +21,7 @@
}

.modal-container.open {
display: block;
display: flex;
}

.modal-overlay {
Expand All @@ -37,9 +39,6 @@
position: absolute;
display: flex;
justify-content: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
min-height: 218px;
background-color: #fff;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export class IfxModal {
// Setting focus on last item and removing immediately
// so, on tab press first element is focused
setTimeout(() => {
this.getLastFocusableElement().focus();
this.getLastFocusableElement().blur();
this.getLastFocusableElement()?.focus();
this.getLastFocusableElement()?.blur();
}, 0);

this.ifxModalOpen.emit();
Expand Down

0 comments on commit c30e84e

Please sign in to comment.