nacular / doodle-tutorials

Tutorials and examples for the Doodle framework.
https://nacular.github.io/doodle-tutorials
MIT License
25 stars 10 forks source link

Input field dissapears on resize #5

Closed feresr closed 1 year ago

feresr commented 1 year ago

The input field disappears on resize, Is this a bug? Apologies if this is not the place for it

Kapture 2022-11-03 at 23 19 51

pusolito commented 1 year ago

Thanks for raising this! It turns out this isn't a bug. The tl; dr is that the calls to render children are incorrect. They result in double painting and interfere with the special treatment the native TextField behavior has to directly manage its DOM. This special handling is only necessary for some native behaviors though, so you'd see this kind of issue only when using them with a child.

feresr commented 1 year ago

The framework will automatically render children

I must've skipped the docs where this is explained, apologies! You're right, thank you! removing child.render() fixes the issue.