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

Commit

Permalink
Merge pull request #4975 from adobe/jasonsanjose/issue-4966-rebase
Browse files Browse the repository at this point in the history
Fix live dev issues after ResearchLiveHTML merge
  • Loading branch information
redmunds committed Aug 28, 2013
2 parents f7ea4e1 + 373497a commit 60dc6b7
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 112 deletions.
12 changes: 6 additions & 6 deletions src/LiveDevelopment/Documents/CSSDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ define(function CSSDocumentModule(require, exports, module) {
this.doc.addRef();
this.onChange = this.onChange.bind(this);
this.onDeleted = this.onDeleted.bind(this);
$(this.doc).on("change", this.onChange);
$(this.doc).on("deleted", this.onDeleted);
$(this.doc).on("change.CSSDocument", this.onChange);
$(this.doc).on("deleted.CSSDocument", this.onDeleted);

this.onActiveEditorChange = this.onActiveEditorChange.bind(this);
$(EditorManager).on("activeEditorChange", this.onActiveEditorChange);
Expand Down Expand Up @@ -113,8 +113,8 @@ define(function CSSDocumentModule(require, exports, module) {

/** Close the document */
CSSDocument.prototype.close = function close() {
$(this.doc).off("change", this.onChange);
$(this.doc).off("deleted", this.onDeleted);
$(this.doc).off(".CSSDocument");
$(EditorManager).off("activeEditorChange", this.onActiveEditorChange);
this.doc.releaseRef();
this.detachFromEditor();
};
Expand All @@ -137,7 +137,7 @@ define(function CSSDocumentModule(require, exports, module) {

if (this.editor) {
$(HighlightAgent).on("highlight", this.onHighlight);
$(this.editor).on("cursorActivity", this.onCursorActivity);
$(this.editor).on("cursorActivity.CSSDocument", this.onCursorActivity);
this.updateHighlight();
}
};
Expand All @@ -146,7 +146,7 @@ define(function CSSDocumentModule(require, exports, module) {
if (this.editor) {
HighlightAgent.hide();
$(HighlightAgent).off("highlight", this.onHighlight);
$(this.editor).off("cursorActivity", this.onCursorActivity);
$(this.editor).off(".CSSDocument");
this.onHighlight();
this.editor = null;
}
Expand Down
Loading

0 comments on commit 60dc6b7

Please sign in to comment.