Browse Source

Tests: Focus back the editor after changing the readonly mode. Closes ckeditor/ckeditor5#840.

Piotrek Koszuliński 6 years ago
parent
commit
4e28493405
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/ckeditor5-core/tests/manual/readonly.js

+ 2 - 0
packages/ckeditor5-core/tests/manual/readonly.js

@@ -27,6 +27,8 @@ ClassicEditor
 		button.addEventListener( 'click', () => {
 			editor.isReadOnly = !editor.isReadOnly;
 			button.textContent = editor.isReadOnly ? 'Turn off read-only mode' : 'Turn on read-only mode';
+
+			editor.editing.view.focus();
 		} );
 	} )
 	.catch( err => {