-
Notifications
You must be signed in to change notification settings - Fork 168
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: Remove removed items from array #11635
Conversation
Remove any elements added to the global array when the DOMNode is removed from the dom. Closes #11608
flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Outdated
Show resolved
Hide resolved
flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Outdated
Show resolved
Hide resolved
eventTarget.addEventListener('DOMNodeRemoved', event => { | ||
const index = window.Vaadin['${globalCssFlag}'].indexOf(target); | ||
window.Vaadin['${globalCssFlag}'].splice(index, 1); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If/when using an observer instead, it can be disconnected after the clean-up
flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Outdated
Show resolved
Hide resolved
Do not push multiples of the same CSS to the document.
1c0c745
to
318145c
Compare
flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Show resolved
Hide resolved
flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Outdated
Show resolved
Hide resolved
...pplication-theme/src/test/java/com/vaadin/flow/webcomponent/ApplicationThemeComponentIT.java
Show resolved
Hide resolved
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608
Hi @caalador and @pleku, when i performed cherry-pick to this commit to 2.7, i have encountered the following issue. Can you take a look and pick it manually? |
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608
Hi @caalador and @pleku, when i performed cherry-pick to this commit to 2.6, i have encountered the following issue. Can you take a look and pick it manually? |
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608 Co-authored-by: caalador <[email protected]>
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608 Co-authored-by: caalador <[email protected]>
Fixes regression caused by #11635 Fixes #11666 Co-authored-by: Pekka Hyvönen <[email protected]>
Fixes regression caused by #11635 Fixes #11666 (cherry picked from commit 9cc240b) Co-authored-by: Pekka Hyvönen <[email protected]>
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608 # Conflicts: # flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608 # Conflicts: # flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Stops css/fonts from being loaded multiple times to the document with embedded applications. Closes #11608 # Conflicts: # flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js
Remove any elements added to the
global array when the DOMNode is removed
from the dom.
Closes #11608