File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 39
39
sel = this . getSelection ( 1 ) ;
40
40
41
41
// Editor may have no selection at all.
42
- if ( sel . getType ( ) == CKEDITOR . SELECTION_NONE )
42
+ if ( ! sel || sel . getType ( ) == CKEDITOR . SELECTION_NONE )
43
43
return ;
44
44
}
45
45
630
630
if ( ( this . _ . savedSelection || this . _ . fakeSelection ) && ! forceRealSelection )
631
631
return this . _ . savedSelection || this . _ . fakeSelection ;
632
632
633
- // Editable element might be absent.
633
+ // Editable element might be absent or editor might not be in a wysiwyg mode .
634
634
var editable = this . editable ( ) ;
635
- return editable ? new CKEDITOR . dom . selection ( editable ) : null ;
635
+ return editable && this . mode == 'wysiwyg' ? new CKEDITOR . dom . selection ( editable ) : null ;
636
636
} ;
637
637
638
638
/**
You can’t perform that action at this time.
0 commit comments