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

URL hash change demo crashes #369

Closed
MaxDesiatov opened this issue Jan 22, 2021 · 1 comment
Closed

URL hash change demo crashes #369

MaxDesiatov opened this issue Jan 22, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MaxDesiatov
Copy link
Collaborator

Describe the bug
URL hash change demo in the TokamakDemo app crashes after interacting with the "DOM reference" demo.

To Reproduce

  1. Build and run TokamakDemo
  2. Navigate to the "DOM reference" demo, click on the button
  3. Navigate to the "URL hash changes" demo

Expected behavior
The "URL hash changes" demo works, but it crashes.

Additional context
Currently reproducible with all browsers.

@MaxDesiatov MaxDesiatov added the bug Something isn't working label Jan 22, 2021
@MaxDesiatov MaxDesiatov self-assigned this Jan 22, 2021
MaxDesiatov pushed a commit that referenced this issue May 31, 2021
…) (#407)

When _domRef is used to directly modify the DOM, this causes the state of the DOM to no longer match the View from which it was rendered. When the renderer later tries to unmount the modified element, this can cause a crash.

This PR fixes the crash by catching (and ignoring) this failure in DOMRenderer.unmount. This fixes #326 and #369, which are the same issue.

Note that directly modifying the DOM with `_domRef` can still cause problems, as the state mismatch remains. For example, an update to the `View` can cause the renderer to overwrite those DOM changes.
@MaxDesiatov
Copy link
Collaborator Author

Closing this as fixed by #407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant