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

Conversation

@as-cii
Copy link
Contributor

@as-cii as-cii commented Jul 13, 2017

Fixes #15005.

Previously, when setModel was called, we forgot to update the pointer to the component in the newly supplied editor. This was causing the element to not update in response to model updates but only as a result of focus or visibility changes. We suspect this regressed during the rewrite of the editor rendering layer.

With this pull request we will now correctly swap the element's underlying editor by updating the component pointer on the newly supplied editor. Also, if the element was already attached to another editor, we will null out the component reference on it, because one instance of TextEditorElement can only represent one instance of TextEditor.

/cc: @nathansobo @tjfryan

@nathansobo
Copy link
Contributor

This looks reasonable. I'll take a look at the test failure now.

Antonio Scandurra and others added 2 commits July 13, 2017 18:13
Previously, when `setModel` was called, we forgot to update the pointer
to the component in the newly supplied editor. This was causing the
element to not update in response to model updates but only as a result
of focus or visibility changes. We suspect this regressed during the
rewrite of the editor rendering layer.

With this commit we will now correctly swap the element's underlying
editor by updating the component pointer on the newly supplied editor.
Also, if the element was already attached to another editor, we will
null out the component reference on it, because one instance of
`TextEditorElement` can only represent one instance of `TextEditor`.
@as-cii as-cii force-pushed the as-fix-calling-editor-element-set-model branch from f079862 to 1d42590 Compare July 13, 2017 16:14
@ungb ungb merged commit 9be492f into master Jul 13, 2017
ungb pushed a commit that referenced this pull request Jul 13, 2017
…-model

Swap underlying editor correctly when calling setModel on editor element
@nathansobo nathansobo deleted the as-fix-calling-editor-element-set-model branch July 13, 2017 18:22
@nathansobo
Copy link
Contributor

❤️ @ungb

@tjfryan
Copy link

tjfryan commented Jul 14, 2017

Thank you so much!

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.

4 participants