File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
notebook/static/notebook/js Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,20 @@ define([
151151 */ theme : 'snow'
152152 } ) ;
153153
154- this . editor . on ( 'focus' , function ( ) {
154+ /* this.editor.on('focus', function () {
155155 if(that.keyboard_manager) {
156156 that.keyboard_manager.enable();
157157 }
158158 that.code_mirror.setOption('readOnly', !that.is_editable());
159+ }); */
160+ this . editor . on ( 'editor-change' , function ( eventName , ...args ) {
161+ //alert('quill caught a click in the editor');
162+ if ( ! that . selected ) and ( eventName == 'selection-change' ) and
163+ ( args [ 0 ] . length >= 0 ) { //we're in the cell
164+ that . events . trigger ( 'select.Cell' , { 'cell' :that } ) ;
165+ }
166+ that . events . trigger ( 'edit_mode.Cell' , { cell : that } ) ;
167+ //if already selected or blurred do nothing.
159168 } ) ;
160169 //codemirror monkeypatch overrides on calls from notebook
161170 //
You can’t perform that action at this time.
0 commit comments