Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Correctly (un)subscribe to model events on PaneAxisElement attach/detach - #11286

Merged
as-cii merged 3 commits into
masterfrom
as-fix-pane-axis-element-subscriptions
Mar 29, 2016
Merged

as-cii merged 3 commits into
masterfrom
as-fix-pane-axis-element-subscriptions

Conversation

@as-cii

@as-cii as-cii commented Mar 28, 2016

Copy link
Copy Markdown
Contributor

Fixes #10903.

This makes sure that when a PaneAxisElement is removed from the DOM and subsequently added back to it (e.g. because of a PaneContainer or PaneAxis's replaceChild call), its internal state gets reinitialized. The initialization process involves resubscribing to the underlying model, as well as cleaning up / rebuilding children on attach/detach.

/cc: @atom/core

as-cii added 3 commits March 28, 2016 14:49
HTML nodes are guaranteed to be detached before being re-attached, so we
are always sure that `subscriptions` is null on attach and non-null on
detach.
@winstliu

Copy link
Copy Markdown
Contributor

Thanks for taking this on @as-cii 😄. I'm pretty sure I could have worked on this for another year and not have fixed the issue.

@nathansobo

Copy link
Copy Markdown
Contributor

Wow nice find @as-cii. ✨

@as-cii
as-cii merged commit ea01981 into master Mar 29, 2016
@as-cii
as-cii deleted the as-fix-pane-axis-element-subscriptions branch March 29, 2016 07:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants