Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Live Preview loads wrong file when changing file quickly #4615

Closed

Description

@WebsiteDeveloper

Steps to reproduce:

  1. Open a somewhat larger html file
  2. Start Live-Preview
  3. Quickly click on another file in your working files

Old Result:

The file opened in step 3 gets shown in Live-Preview

Current Result:
Live Preview does not open and "Unable to load Live Preview page" error is seen.

Expected:
Show the html file from step 3

Activity

  1. njx commented on Aug 5, 2013

    @njx

    @WebsiteDeveloper - I think this is working as designed; Live Preview is always supposed to switch to show the currently open HTML file, so in this case it should show the file from step 3. We've talked about making it possible to "lock" the live preview to a given file, but that's not implemented right now.

  2. WebsiteDeveloper commented on Aug 5, 2013

    @WebsiteDeveloper
    ContributorAuthor

    @njx acually it opens any file type even js files ^ should have made that more clear

  3. reopened this on Aug 5, 2013
  4. njx commented on Aug 5, 2013

    @njx

    Oh, that's bad :) Thanks for the clarification.

    If you have any earlier sprints installed, would you mind seeing how far back this bug goes? I'm curious whether it's a recent regression.

  5. WebsiteDeveloper commented on Aug 5, 2013

    @WebsiteDeveloper
    ContributorAuthor

    will try out.

  6. WebsiteDeveloper commented on Aug 5, 2013

    @WebsiteDeveloper
    ContributorAuthor

    @njx it happens even in the oldest version i have currently installed which is Sprint 23 so it seems to be a pretty old regression.

  7. WebsiteDeveloper commented on Mar 6, 2014

    @WebsiteDeveloper
    ContributorAuthor

    @njx ping.

  8. redmunds commented on Mar 6, 2014

    @redmunds
    Contributor

    @WebsiteDeveloper Thanks for following up.

    I was reviewing Live Preview bugs yesterday and missed this one. I still see this problem in latest code. #5756 is a duplicate of this one. #5110 is similar, but it switches to JS (not HTML) file. I tried to fix this in #6889, but it's still not quite right.

  9. self-assigned this
    on Mar 6, 2014
  10. redmunds commented on Mar 6, 2014

    @redmunds
    Contributor

    Actually, I disagree with the Expected Results. If you change the selected HTML file in Brackets, then Live Preview should also change, right?

  11. WebsiteDeveloper commented on Mar 9, 2014

    @WebsiteDeveloper
    ContributorAuthor

    That's right.

  12. added this to the milestone on Mar 15, 2014
  13. redmunds commented on Mar 15, 2014

    @redmunds
    Contributor

    Added Brackets 1.0 milestone. Launching Live Preview is still kind of slow, so this is not difficult to hit.

    What we need to do when LiveDevelopment._openDeferred resolves is to verify that DocumentManager.getCurrentDocument() is the same as _liveDocument. If not, navigate to DocumentManager.getCurrentDocument().

  14. njx commented on Apr 11, 2014

    @njx

    Reviewed. It seems like this isn't likely for many people to hit (because they wouldn't really be switching away right after launching), but the fix seems relatively straightforward. So, if we were to try to fix this, we'd want to timebox it, and bail if it gets complicated.

    Moving to low priority. Leaving in the 1.0 milestone for now, but we should delay working on any of these live preview bugs until we know whether we're going to be migrating to the new non-CDT-based architecture for 1.0.

  15. peterflynn commented on Apr 11, 2014

    @peterflynn
    Member

    Marking needs review to reconsider 1.0 in/out question later

  16. peterflynn commented on Apr 11, 2014

    @peterflynn
    Member

    Also note: this might be a dupe of #5110 now that the description has been updated.

  17. redmunds commented on May 29, 2014

    @redmunds
    Contributor

    Confirmed. Closing. @WebsiteDeveloper Let us know if this is not fixed. Switching Milestone from Brackets 1.0 to Release 40

  18. modified the milestones: Release #40, on May 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions