Live Preview fixes

This is for #6122.

I also found a repeatable recipe that was causing connection errors when changing files, so I fixed the case of relaunching browser after "Relaunch Chrome" dialog is shown. See inline comments for more info.