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

Saving file doesn't trigger browser reload #7497

Closed
peheje opened this issue Apr 12, 2014 · 13 comments
Closed

Saving file doesn't trigger browser reload #7497

peheje opened this issue Apr 12, 2014 · 13 comments

Comments

@peheje
Copy link

peheje commented Apr 12, 2014

Brackets version 37, OSX Mavericks 10.9.2

Sometimes saving a file doesn't trigger the reload in Chrome, seems to only happen if I open the folder in which the file I'm editing is located.

A video is linked:
https://dl.dropboxusercontent.com/u/1823537/bug.mp4
I noticed how it's as if it doesn' work when Chrome address bar says 127.0.0.1 but works when the address bar just displays the filepath.

Thanks for a nice piece of SW!

@marcelgerber
Copy link
Contributor

Well, AFAIK (inline) JS works not that good yet in live preview (at least code that is only fired once).

It works in the other project cause files outside of a project are "previewed" via file:/// protocol and simply reloaded on save.

@pthiess
Copy link
Contributor

pthiess commented Apr 13, 2014

@dangoor Is this getting better once we refactored the Tern integration?

@dangoor
Copy link
Contributor

dangoor commented Apr 14, 2014

@contradel We could change the behavior so that if you save an HTML file with JavaScript changes in it, it then reloads the browser. I don't think we'd want to reload the browser on every keypress (with HTML and CSS, we can make less disruptive changes in the browser in a way that's not really possible with JS).

@pthiess this particular request doesn't really touch the JS code hints.

@njx
Copy link
Contributor

njx commented Apr 14, 2014

Reviewed, medium priority. Might at least want a way to message to people that script tags don't live update.

@nullroar
Copy link

I've been spoiled by live, in-editor CSS changes without the need to save. I guess I shouldn't have gotten my hopes up for JS, in retrospect.

@dangoor
Copy link
Contributor

dangoor commented Apr 16, 2014

@nullroar Yeah, I'd love to be able to do live JS and have thought about it a fair bit. But, there are a variety of reasons why it just can't work (at least not the way people write typically JS).

@nullroar
Copy link

Assuming it wouldn't load any variables that haven't been declared and wouldn't run a loop before it is finished, what's wrong with, say, a "push" feature to push the new functions / variables etc. without actually "saving" ?

The issue a lot of folks have (especially those from an HTML/CSS background) is that we are in the habit of testing code before we save, and it feels a bit unusual to "save" in order to test.

#Wishlist.

@peheje
Copy link
Author

peheje commented Apr 16, 2014

Hi Dangoor. Thank you for the response.
Have you seen the video?
When you save a file it already automatically refreshes the page IF you haven't opened the folder wherein your working file is. This seems to agree with the feature list:
https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#live-preview

"If you edit any other type of file, the page is auto-reloaded when you save".

If however you have opened the folder wherein the file you're working with lies, it doesn't reload the browser when you save.

That's the culprit. That's what I wanted to report as a bug. This is not a feature request.

Nice to see such an active community 👍

@dangoor
Copy link
Contributor

dangoor commented Apr 16, 2014

@contradel yes, sorry to hijack your bug for a couple of comments there. The short story is indeed that it should reload when you save JavaScript and anything else is a bug :)

@peheje
Copy link
Author

peheje commented Apr 16, 2014

No sweat!
Just wanted to make sure the bug report was clear ;-) Have a nice easter.

2014-04-16 19:06 GMT+02:00 Kevin Dangoor [email protected]:

@contradel https://github.com/contradel yes, sorry to hijack your bug
for a couple of comments there. The short story is indeed that it should
reload when you save JavaScript and anything else is a bug :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/7497#issuecomment-40624985
.

@baursak
Copy link

baursak commented Jul 9, 2014

So if I have HTML file with Javascript snippet inside - just saving this "mixed" HTML file after embedded Javascript changes will not cause Chrome to reload? - And this isn't a bug, but rather a feature???

@dangoor
Copy link
Contributor

dangoor commented Jul 28, 2014

@baursak No, it's not a feature. The change here would be to make it so that saving an HTML file with changes to inline scripts should reload the page.

@redmunds
Copy link
Contributor

Closing as a duplicate of #5656.

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

No branches or pull requests

8 participants