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

Correctly update the context info when changing paths. #1041

Merged
merged 1 commit into from
Feb 19, 2021
Merged

Conversation

thet
Copy link
Member

@thet thet commented Feb 19, 2021

Do only remove the correct event listener on context-info-loaded before adding a new one.
Fixes a problem where the current path was not updated for the upload popup when changing paths.
Fixes: #1016
Refs: #1028, #1030, #1039

Do only remove the correct event listener on ``context-info-loaded`` before adding a new one.
Fixes a problem where the current path was not updated for the upload popup when changing paths.
Fixes: #1016
Refs: #1028, #1030, #1039
Copy link
Sponsor Member

@fredvd fredvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

In hindsight, instead of passing the function, I used the 'namespace' last year to fix other event listeners. That could have worked here as well:

.off('click.textfilter').on('click.textfilter', function() {

But that was done on browsers events like 'click', not our own custom events. Passing the function what you do here is clearer than the namespace magic of jQuery.

tested the branch locally.

@thet thet merged commit 9f42660 into 3.x Feb 19, 2021
@thet thet deleted the thet-fix-1016 branch February 19, 2021 16:00
@thet
Copy link
Member Author

thet commented Feb 19, 2021

The namespace thing is really magic and not quite self-explanatory.
Tnx for reviewing!

@mauritsvanrees
Copy link
Sponsor Member

Released in mockup 3.2.5 and plone.staticresources 1.4.2. Thank you both!

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

Successfully merging this pull request may close these issues.

3 participants