8
0
Просмотр исходного кода

Editor isReadOnly should be bound to the view document.

Szymon Kupś 8 лет назад
Родитель
Сommit
dc50c02f8f

+ 1 - 1
packages/ckeditor5-core/src/editor/editor.js

@@ -118,7 +118,7 @@ export default class Editor {
 		 * @member {module:engine/controller/editingcontroller~EditingController}
 		 */
 		this.editing = new EditingController( this.model );
-		this.editing.view.bind( 'isReadOnly' ).to( this );
+		this.editing.view.document.bind( 'isReadOnly' ).to( this );
 
 		/**
 		 * Conversion manager to which conversion dispatchers are registered. Used to add converters to the editor.

+ 3 - 3
packages/ckeditor5-core/tests/editor/editor.js

@@ -138,16 +138,16 @@ describe( 'Editor', () => {
 			expect( editor.config.get( 'bar' ) ).to.equal( 'foo' );
 		} );
 
-		it( 'should bind editing.view#isReadOnly to the editor', () => {
+		it( 'should bind editing.view.document#isReadOnly to the editor', () => {
 			const editor = new Editor();
 
 			editor.isReadOnly = false;
 
-			expect( editor.editing.view.isReadOnly ).to.false;
+			expect( editor.editing.view.document.isReadOnly ).to.false;
 
 			editor.isReadOnly = true;
 
-			expect( editor.editing.view.isReadOnly ).to.true;
+			expect( editor.editing.view.document.isReadOnly ).to.true;
 		} );
 
 		it( 'should activate #keystrokes', () => {