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

0.8-preview: newline confuses findAnnotatedNode #1078

Closed
morethanreal opened this issue Jan 8, 2015 · 2 comments
Closed

0.8-preview: newline confuses findAnnotatedNode #1078

morethanreal opened this issue Jan 8, 2015 · 2 comments

Comments

@morethanreal
Copy link
Contributor

http://jsbin.com/nulupa/1/edit?html,output

If there's a newline between the opening and closing tags, I get an exception. Otherwise, there is no error.

<!-- this is ok -->
<x-something><x-something>

<!-- throws exception -->
<x-something>
</x-something>
@sjmiles sjmiles changed the title 0.8-preview: Cannot read property 'lightChildren' of undefined 0.8-preview: newline confuses findAnnotatedNode Jan 8, 2015
@sjmiles
Copy link
Contributor

sjmiles commented Jan 8, 2015

When there is no <content> in the template, _useContent is false, so the light-dom children are ignored. Then the stamped DOM is combined with whatever was in light-dom, causing the annotation data to be incorrect.

Seems like we dealt with a flavor of this before, so I'm not sure if this came up anew because of changes around projection?

As I recall, the 'combining' of stamped and light-dom was an experimental concept. ShadowDOM proper does not work this way of course. For conformance we can replace instead of combine, or alternatively light DOM needs to be snarfed up any time there is a template.

@sorvell
Copy link
Contributor

sorvell commented Jan 16, 2015

We now create a localDom (shadyRoot) whenever localDom is created. This should that light dom nodes are properly accounted for in composition, and as a side effect of this, they should not get in the way of the annotator.

Fixed by a68e2fc

@sorvell sorvell closed this as completed Jan 16, 2015
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

No branches or pull requests

3 participants