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

directive in slots should be binded into "in-dom" structure of parent component #3529

Closed
trailskr opened this issue Aug 25, 2016 · 2 comments

Comments

@trailskr
Copy link
Contributor

trailskr commented Aug 25, 2016

Vue.js versions

1.0.26, 2.0.0-rc.3

Reproduction Link

fiddle 1.0.26
fiddle 2.0.0-rc.3

What is Expected?

expected dom structure will be the same in directive bind hook and after tick from it

What is actually happening?

in bind hook <comp /> is #docuement-fragment (or null in 2.0)
after tick from bind it <div><p>...</p></div>

I know, may be it'is not a bug. Slots compiles under parent of component that has slots (root instance in this case), and may be it is not possible to bind directives after slot component is "in dom" but who knows?

@yyx990803
Copy link
Member

Implemented in 2.0, this will likely be a wontfix in 1.x, but we will revisit it when working on 1.1.

@yyx990803
Copy link
Member

Note: the behavior is introduced in rc.4 but will be reverted in next release. Instead, a new custom directive hook inserted is introduced, which will be called when the element has been inserted into a parent node.

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

2 participants