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 does not re-delegateEvent on previously closed view #654
Conversation
Any comments? Would appreciate this getting merged in and released, I'd like to be running off of mainline marionette instead of my monkey-patched marionette. Thanks. |
Looks like a dup. of this except you made a pull request :-) I hope it gets accepted. +1 for this |
Yeah, I think this definitely should go in, or else the documentation for Region should be updated to reflect that the UI, event, and model bindings will need to re-delegated manually. |
I was struggling with this for the past few days, this is awesome really need to be integrated |
👍 Been dealing with this same issue. Would love to see this merged in. |
If anyone is feeling adventurous: I rebased this pull request off of the current head of Dev, and then rebuilt with the fix into that other branch. |
Is this PR the right way to fix this @derickbailey ? |
Looks like he fixed this in 1.1 with his own fix? This is a quote from the v1.10 change log released a few days ago.
|
I don't think that commit log message is the same problem. Specifically, try this jsfiddle: It's pointing towards the latest 1.1 build and it still doesn't work. |
Yea you're right. I didn't test what I was thinking when I wrote that. Maybe we can get some feedback from @derickbailey |
👍 for this. I'm having trouble with onRender: function() {
this.$shouldBeUI = $('#some-id');
} This is what I was using before realizing that ui: {
'shouldBeUI': '#some-id'
} |
@@ -132,7 +132,12 @@ _.extend(Marionette.Region.prototype, Backbone.Events, { | |||
if (isDifferentView || isViewClosed) { | |||
this.open(view); | |||
} | |||
|
|||
|
|||
if (isViewClosed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only commit this change, not all the whitespace changes
👍 once the whitespace stuff is fixed |
@jpdesigndev I published a fix for the UI issue about a month ago; is it in your codebase, and are you still seeing that problem? #686 |
@diwu1989 is this still active? |
I think the semantics of this are wrong. Isn't A better fix here would be a new method on |
If the other PR fixes this issue, then please just go ahead with that one. Thanks! |
This is a fix for #651
Region.show will call delegateEvents on the view if the view is one that was previously closed.
Test included.