Skip to content

Conversation

jasongrout
Copy link
Member

@jasongrout jasongrout commented Dec 18, 2016

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.

@jasongrout jasongrout changed the title Resize events bubble up to become window.resize events Scope OutputArea events with '.OutputArea' Dec 18, 2016
@jasongrout jasongrout added this to the 5.0 milestone Dec 18, 2016
that.element.height('');
}
that.element.trigger('resize');
that.element.trigger('resize.Output');
Copy link
Member

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?

Copy link
Member Author

@jasongrout jasongrout Jan 5, 2017

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?

Copy link
Member

Choose a reason for hiding this comment

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

Works for me

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@takluyver
Copy link
Member

@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.
@jasongrout
Copy link
Member Author

@jasongrout This now has a merge conflict, can you rebase it?

@takluyver - done.

@takluyver takluyver changed the title Scope OutputArea events with '.OutputArea' Rename 'resize' event to 'resizeOutput' Jan 20, 2017
@takluyver takluyver merged commit 58c66ef into jupyter:master Jan 20, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants