question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing shadow-roots on injected Components

See original GitHub issue

vaadin-14-project.zip Hello, we have noticed some difficult behaivor, regarding injected Components. It started after migrating to vaadin 14. I have created a demo project to illustrate this bug (?).

Description of the problem

The problem seems to occur when injecting a component via Interface. The injection works fine for the content but somehow the shadow-root gets lost and thus there are no styles on this element.

But if we inject an implementation of this interface everything works just fine.

About this project

This project is an simplification of a webgui which is running within a docker-container. We are using Thorntail. The configuration is taking place within the pom.xml.

We are only developing against the newest Chrome browser.

Requirements

You need Docker on your machine.

Starting the Project

$ mvn clean package

How to reproduce this problem

To reproduce this behaivor please open the MainUI-class and toggle the comments line 36 and 37.

You can furthermore observe if you use the implementation of the Components everything works fine as described before. But if you click one of the buttons no Notification is shown. If you inspect the DOM you will find it is there but like before just the tag without shadow-root. This can be fixed by uncommenting line 39.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Legiothcommented, Sep 11, 2019

As a workaround, you can use the @Uses annotation on e.g. MainUI to explicitly define components that should be considered when determining what to include.

0reactions
mehdi-vaadincommented, May 4, 2020

@PascalSchoe, since we haven’t heard from you and the issue seems to be resolved, I’m closing this. Please create a new issue if you still have this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Injected CSS into the Shadow root. Yet styles are getting ...
I'm building a widget and to avoid css conflicts, I moved widget css into the Shadow root. But ...
Read more >
"open-stylable" Shadow Roots · Issue #909 - GitHub
Implement a custom CSS scoping mechanism for when shadow dom is off. Some specific library, eg Tailwind, converted to work with shadow roots....
Read more >
5. Working with the Shadow DOM - Modern JavaScript [Book]
Any styles defined in the shadow DOM are scoped to the shadow root. They are not applied to any elements outside of this...
Read more >
Styling in the Shadow DOM With CSS Shadow Parts
This stops users of the component from styling any arbitrary element inside the shadow tree. It is up the the component author to...
Read more >
Rendering React App in Shadow DOM with Style ...
Render in Shadow DOM with SSR and Styled Components ... A Section inside the shadow root, used to inject styles by styled-components -->....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found