rixo
rixo
Do you know if that's still the case in Svelte Native?
@pasevin Can you confirm that you have compiler's `dev` option to `true` when this happens?
Hey! Some progress update... I have studied how feasible this could be, and came up with some (dirty/incomplete) POC here: https://github.com/rixo/svelte-hmr/blob/poc-preserve-children/PRESERVE_CHILDREN_STATE.md#demo. However, this is probably not something that can be...
Thanks @typhonrt for raising the issue. I'm happy that the preexisting experimental API solves your current need, and I believe that your return on experience, combined with what motivated me...
HMR just destroys and recreates your component. If you have a leaking `setInterval` that keeps running, you would have the same problem in production. HMR just makes it more obvious,...
You can have it with webpack-dev-server (used by official Svelte template for Webpack) by adding `devServer.overlay: true` to your `webpack.config.js` (example [here](https://github.com/rixo/demo-svelte3-hmr/blob/9ad68a7680b00eda161398daf48e4c1fa9c17a55/webpack.config.js#L75)). This can also be done with HMR over...
@antony it's about displaying compile errors in the browser. It's a feature of the dev server (that needs support from the bundler).
I've been bitten by this problem too, when doing a invoice editor of sort. The element is indeed removed from the DOM by `insertBefore` by this code (confirmed by debugger...
Re-reading the conversation above... The element is indeed not recreated, allowing it to keep its internal value, but the mere act of removing it (temporarily) from the DOM steals focus...
The difference is that when moving forward, it's the following node that is moved before the focused node. The focused node is only used as the anchor, but it stays...