-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): dropdown positioning (#1681)
Co-authored-by: Daniel Leroux <daniel.leroux@siemens.com>
- Loading branch information
1 parent
6fd44e0
commit 5b56d90
Showing
7 changed files
with
108 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@siemens/ix": patch | ||
--- | ||
|
||
Update `@floating-ui/dom` dependency to fix a wrong placement of the `ix-dropdown` if the dropdown is placed inside a `dialog`-element with animations in certain environments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function checkForError( | ||
consoleSpy: jasmine.Spy, | ||
errorName: string | ||
): boolean { | ||
return consoleSpy.calls | ||
.allArgs() | ||
.some((arg) => arg[0].toString().includes(errorName)); | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/angular-test-app/src/test/utils/wait-for-hydration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export function waitForHydration( | ||
element: HTMLElement, | ||
timeout = 5000 | ||
): Promise<void> { | ||
return new Promise((resolve, reject) => { | ||
const interval = 50; | ||
let elapsedTime = 0; | ||
|
||
const checkClass = () => { | ||
if (element.classList.contains('hydrated')) { | ||
resolve(); | ||
} else if (elapsedTime >= timeout) { | ||
reject(new Error(`Timeout waiting for hydration`)); | ||
} else { | ||
elapsedTime += interval; | ||
setTimeout(checkClass, interval); | ||
} | ||
}; | ||
|
||
checkClass(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.