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

Region reset called during view render does not clear the region.el when needed #3540

Open
JSteunou opened this issue Nov 14, 2017 · 3 comments
Milestone

Comments

@JSteunou
Copy link
Contributor

Description

Kind of tricky but this is the use case:

  1. Create a view
  2. Manually init a region with a node element as el
  3. re-render the view
  4. region reset is invoked, emptying the region, but keeping the el
  5. try to showChildView on each view onRender => fail because region.el does not exists anymore

Expected behavior

Region el should be cleaned on reset if the reset is after a view render aka el do not exists in the DOM anymore

Actual behavior

Region el is kept, which lead to error on consecutive render

@JSteunou
Copy link
Contributor Author

@marionettejs/marionette-core this is an actual issue for auto-region next feature and I dont know if this issue should be address today by Marionette or just document as good practice to user like "Always reset your region.el after view render" or just fix solely for and in next region.

@JSteunou
Copy link
Contributor Author

Fix & use case with auto region 6640814

@paulfalgout paulfalgout added this to the v5 milestone Apr 29, 2019
@paulfalgout
Copy link
Member

I think this will be resolved in the new region work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants