-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: $el set in constructor might be resolved wrongly #3389
Comments
I'm pretty sure I follow this, but a fiddle would help. This would require regions be setup after Personally I think that the ideal fix would be for regions to never be initialized unless Then I also think that we should remove the DOM lookup from the region altogether. I think ideally the view should pass the We might be able to make the |
A pretty poor work around for the moment would be to: regions() {
this.setElement(this.el);
return {
region: '.selector'
}
} |
I'll try to deliver a fiddle tomorrow. But this workaround should indeed work. |
Here's a demo: https://jsfiddle.net/9732v9cx/ |
ah the problem in the workaround is that |
@paulfalgout that's kind of what I did in my autoregion plugin, and indeed that's way better https://github.com/JSteunou/marionette.autoregion |
Description
Expected behavior
Region's $el should be usable if it is set in constructor. Regions could be initialized after a view calls setElement.
Environment
The text was updated successfully, but these errors were encountered: