multihack / multihack-brackets

Realtime collaboration for programmers. (Brackets Extension)
MIT License
24 stars 9 forks source link

Remote changes break LivePreview #25

Closed Worie closed 7 years ago

Worie commented 7 years ago

Hi!

Brackets has a feature called LivePreview, which is basicly kind-of browser sync for html/js/css files.

That'd be great, if this extension worked with live preview.

Currently, there are some bugs when remoteChanges are applied to file when LivePreview is open.

While not optimal, the livedev.reload() on change in handleRemoteChange fixes it. Ofc, if there are better solutions for this that'd be great, but I guess that'd give multihack-brackets another big step into easy collaboration (or education purposes) between peers.

t-mullen commented 7 years ago

It worked before... What issues have you noticed?

Worie commented 7 years ago

It's kind of like remote changes are appended to the preview in the browser, instead of replacing them: http://imgur.com/rZ1x2f0

t-mullen commented 7 years ago

This is a regression, that used to work. I'll look into it.

t-mullen commented 7 years ago

There's some weird issue with how Brackets handles change events that I can't pinpoint.

The cause of the issue is just the replaceRange method, which should behave just like a normal user change, but does not.

Reloading works fine for now.