-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Rename 'resize' event to 'resizeOutput' #1984
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
Conversation
that.element.height(''); | ||
} | ||
that.element.trigger('resize'); | ||
that.element.trigger('resize.Output'); |
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.
We scope events to components when they are global events (e.g. on events.trigger('event.Component')
). These are events on a specific element, so scoping seems redundant, doesn't it? For instance, you still can't listen for all resize.Output
events with this, can you? Is that what you are after?
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.
What I was after was fixing the bug where 'resize' events bubble up, then are thrown on the window, and are considered window resize events.
We could just as easily change the name from 'resize' to 'resizeOutput'. Thoughts?
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.
Works for me
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.
done
@jasongrout This now has a merge conflict, can you rebase it? |
This addresses the ‘resize’ event bubbling issue mentioned in https://bugs.jquery.com/ticket/9841#comment:8 by not triggering an event that will bubble up to something unrelated.
@takluyver - done. |
Our convention for events has been to scope component events with
.Component
, but we didn't do it for some OutputArea events. This is also related to #1985.This is a breaking change (changes the names of events), so targeting 5.x.