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

Properties depending on children don't take effect when set in current cycle #338

Open
pkamenarsky opened this issue Nov 26, 2015 · 3 comments

Comments

@pkamenarsky
Copy link

Like scrollTop: http://codepen.io/anon/pen/MaMEWg?editors=001 (notice how the div doesn't scroll to the bottom.)

This is because property patches are applied before the children nodes have been patched. It seems though that properties like scrollTop depend on the childrens' state so that they can take effect.

Applying property patches after all other node patches would fix this.

@pkamenarsky
Copy link
Author

Probably a duplicate of #289.

@dhruvio
Copy link

dhruvio commented Jan 5, 2016

Not sure if this will help you, but I had the same issue and managed to find a solution without changing the virtual-dom source code (I am using mercury). I used a Widget instead of a hyperscript vnode so I have control over the diffing & patching.

Here are some docs that may help you:

https://github.com/Matt-Esch/virtual-dom/blob/master/docs/widget.md
https://github.com/Raynos/mercury/blob/master/examples/real-dom.js
https://github.com/Matt-Esch/virtual-dom/blob/master/docs.jsig // scroll down to the Widget section

@rksm
Copy link

rksm commented Sep 20, 2016

What's the status of this? Doesn't seem that PR #339 is considered to be merged?

jgaskins pushed a commit to clearwater-rb/virtual-dom that referenced this issue Dec 16, 2016
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