Skip to content
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

[CLOSED] Fix Live Preview for Docs not in Working Set #7701

Open
core-ai-bot opened this issue Aug 30, 2021 · 0 comments
Open

[CLOSED] Fix Live Preview for Docs not in Working Set #7701

core-ai-bot opened this issue Aug 30, 2021 · 0 comments

Comments

@core-ai-bot
Copy link
Member

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:

  1. HTMLDocument now ref counts this.doc Document so it persists while Live Preview is connected.
  2. HTMLDocument now listens for 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant