@@ -73,7 +73,7 @@ define(function CSSDocumentModule(require, exports, module) {
7373 $ ( this . doc ) . on ( "deleted.CSSDocument" , this . onDeleted ) ;
7474
7575 this . onActiveEditorChange = this . onActiveEditorChange . bind ( this ) ;
76- $ ( EditorManager ) . on ( "activeEditorChange.CSSDocument " , this . onActiveEditorChange ) ;
76+ $ ( EditorManager ) . on ( "activeEditorChange" , this . onActiveEditorChange ) ;
7777
7878 if ( editor ) {
7979 // Attach now
@@ -113,9 +113,8 @@ define(function CSSDocumentModule(require, exports, module) {
113113
114114 /** Close the document */
115115 CSSDocument . prototype . close = function close ( ) {
116- $ ( this . doc ) . off ( "change.CSSDocument" ) ;
117- $ ( this . doc ) . off ( "deleted.CSSDocument" ) ;
118- $ ( EditorManager ) . off ( "activeEditorChange.CSSDocument" ) ;
116+ $ ( this . doc ) . off ( ".CSSDocument" ) ;
117+ $ ( EditorManager ) . off ( "activeEditorChange" , this . onActiveEditorChange ) ;
119118 this . doc . releaseRef ( ) ;
120119 this . detachFromEditor ( ) ;
121120 } ;
@@ -137,7 +136,7 @@ define(function CSSDocumentModule(require, exports, module) {
137136 this . editor = editor ;
138137
139138 if ( this . editor ) {
140- $ ( HighlightAgent ) . on ( "highlight.CSSDocument " , this . onHighlight ) ;
139+ $ ( HighlightAgent ) . on ( "highlight" , this . onHighlight ) ;
141140 $ ( this . editor ) . on ( "cursorActivity.CSSDocument" , this . onCursorActivity ) ;
142141 this . updateHighlight ( ) ;
143142 }
@@ -146,8 +145,8 @@ define(function CSSDocumentModule(require, exports, module) {
146145 CSSDocument . prototype . detachFromEditor = function ( ) {
147146 if ( this . editor ) {
148147 HighlightAgent . hide ( ) ;
149- $ ( HighlightAgent ) . off ( "highlight.CSSDocument" ) ;
150- $ ( this . editor ) . off ( "cursorActivity .CSSDocument" ) ;
148+ $ ( HighlightAgent ) . off ( "highlight" , this . onHighlight ) ;
149+ $ ( this . editor ) . off ( ".CSSDocument" ) ;
151150 this . onHighlight ( ) ;
152151 this . editor = null ;
153152 }
0 commit comments