Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ define(function LiveDevelopment(require, exports, module) {
*/
};

var _liveDocument; // the live HTML document
var _htmlDocumentPath; // the path of the html file open for live development
var _liveDocument; // the document open for live editing.
var _relatedDocuments; // CSS and JS documents that are used by the live HTML document

/** Augments the given Brackets document with information that's useful for live development. */
Expand Down Expand Up @@ -359,9 +360,10 @@ define(function LiveDevelopment(require, exports, module) {
_openDocument(doc, editor);
} else {
/* FUTURE: support live connections for docments other than html */
if (doc.extension && doc.extension.indexOf('htm') === 0) {
if (doc.extension && doc.extension.indexOf('htm') === 0 && doc.file.fullPath !== _htmlDocumentPath) {
close();
setTimeout(open);
_htmlDocumentPath = doc.file.fullPath;
}
}
} else if (exports.config.autoconnect) {
Expand Down