-
Notifications
You must be signed in to change notification settings - Fork 155
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
DOM node is not attached to ElRef under some conditions #685
Comments
thanks for reporting! |
It turns out that switching As the timer-based example can be easier to analyze, I pushed timer-based version to repository on branch |
@wkordalski thanks for the example in the repo. I can reproduce the described behavior. |
The example is too big for me to quickly orient in it by myself and imagine all possible cases, so only some general ideas:
Sorry I can't help more, gl 🙂 |
Sorry. I've reduced example size from around 5k LOC to 250 LOC (counting Rust only), and I feel it can be hard to reduce more.
I won't be surprised too.
As I know, whole Seed app and timers run on a single thread and the async tasks are scheduled using non-preemptive scheduler (run What is more, replacing
This might be. Especially that the documentation of Generally thank you very much for your hints and ideas! I hope that this report will help somebody who meet a similar problem or while fixing another bug. |
Ok... At least I did
|
Versions
I can reproduce this bug in Seed 0.9
I cannot reproduce this bug in Seed 0.8
In short:
view
we return something likediv![el_ref(&some_elref), div!["Some text"]]
view
, insideupdate
some_elref.get().is_none()
is true.This means that DOM node is not attached to
ElRef
under some conditions.Example: https://github.com/wkordalski/seed-elref-bug
Run it with:
Open
localhost:8888
Open Developer tools (esp. console).
Click "Add measurements" few times (not every time this bug is visible)
Exploading assertion should be visible in the console.
...under some conditions
It seems that this bug is related to running async code or websockets.
The text was updated successfully, but these errors were encountered: