Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Popup): prevent a rare runtime error #8707

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Conversation

vladitasev
Copy link
Contributor

@vladitasev vladitasev commented Apr 9, 2024

In 1.x it was possible to have this code:

(new Dialog()).show()

without appending the dialog to the DOM tree, and it would work without throwing any errors (would just show the block layer) because the static area item was forced to be rendered even without the dialog itself being rendered.

In 2.x the same code throws a runtime error, because the blocking layer is not available before the component has been rendered (the shadow root is empty).

This fixes the error, although it is not a real use case.

@vladitasev
Copy link
Contributor Author

A third-party library using UI5 Web Components has a unit test that uses the above syntax.

@vladitasev vladitasev merged commit 02eb1c7 into main Apr 10, 2024
9 checks passed
@vladitasev vladitasev deleted the dialog-fix-runtime-error branch April 10, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants