You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simple recipe in #7886 uncovers a big design flaw in live preview where docs not in the working set don't work. I suspect that many reported problems and open issues are related to this subtle difference.
The issue is that live preview caches HTMLDocument objects, but the Document and Editor objects that it references are only maintained when doc is in the working set. When doc is not in the working set, a new Document and Editor object is created every time it is selected in project tree.
This PR makes 2 changes:
HTMLDocument now ref counts this.doc Document so it persists while Live Preview is connected.
HTMLDocument now listens for activeEditorChange event to handle Editor changes. This includes proper updating of event listeners and HTMLInstrumentation.
Issue by redmunds
Thursday Jul 31, 2014 at 15:24 GMT
Originally opened as adobe/brackets#8605
The simple recipe in #7886 uncovers a big design flaw in live preview where docs not in the working set don't work. I suspect that many reported problems and open issues are related to this subtle difference.
The issue is that live preview caches HTMLDocument objects, but the Document and Editor objects that it references are only maintained when doc is in the working set. When doc is not in the working set, a new Document and Editor object is created every time it is selected in project tree.
This PR makes 2 changes:
this.doc
Document so it persists while Live Preview is connected.activeEditorChange
event to handle Editor changes. This includes proper updating of event listeners and HTMLInstrumentation.redmunds included the following code: https://github.com/adobe/brackets/pull/8605/commits
The text was updated successfully, but these errors were encountered: