@@ -69,8 +69,8 @@ define(function CSSDocumentModule(require, exports, module) {
6969 this . doc . addRef ( ) ;
7070 this . onChange = this . onChange . bind ( this ) ;
7171 this . onDeleted = this . onDeleted . bind ( this ) ;
72- $ ( this . doc ) . on ( "change" , this . onChange ) ;
73- $ ( this . doc ) . on ( "deleted" , this . onDeleted ) ;
72+ $ ( this . doc ) . on ( "change.CSSDocument " , this . onChange ) ;
73+ $ ( this . doc ) . on ( "deleted.CSSDocument " , this . onDeleted ) ;
7474
7575 this . onActiveEditorChange = this . onActiveEditorChange . bind ( this ) ;
7676 $ ( EditorManager ) . on ( "activeEditorChange" , this . onActiveEditorChange ) ;
@@ -113,8 +113,8 @@ define(function CSSDocumentModule(require, exports, module) {
113113
114114 /** Close the document */
115115 CSSDocument . prototype . close = function close ( ) {
116- $ ( this . doc ) . off ( "change" , this . onChange ) ;
117- $ ( this . doc ) . off ( "deleted " , this . onDeleted ) ;
116+ $ ( this . doc ) . off ( ".CSSDocument" ) ;
117+ $ ( EditorManager ) . off ( "activeEditorChange " , this . onActiveEditorChange ) ;
118118 this . doc . releaseRef ( ) ;
119119 this . detachFromEditor ( ) ;
120120 } ;
@@ -137,7 +137,7 @@ define(function CSSDocumentModule(require, exports, module) {
137137
138138 if ( this . editor ) {
139139 $ ( HighlightAgent ) . on ( "highlight" , this . onHighlight ) ;
140- $ ( this . editor ) . on ( "cursorActivity" , this . onCursorActivity ) ;
140+ $ ( this . editor ) . on ( "cursorActivity.CSSDocument " , this . onCursorActivity ) ;
141141 this . updateHighlight ( ) ;
142142 }
143143 } ;
@@ -146,7 +146,7 @@ define(function CSSDocumentModule(require, exports, module) {
146146 if ( this . editor ) {
147147 HighlightAgent . hide ( ) ;
148148 $ ( HighlightAgent ) . off ( "highlight" , this . onHighlight ) ;
149- $ ( this . editor ) . off ( "cursorActivity" , this . onCursorActivity ) ;
149+ $ ( this . editor ) . off ( ".CSSDocument" ) ;
150150 this . onHighlight ( ) ;
151151 this . editor = null ;
152152 }
0 commit comments