Przeglądaj źródła

Other: Fixed code style & grammar in comments.

Maciej Gołaszewski 7 lat temu
rodzic
commit
c5354924f8
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      packages/ckeditor5-widget/src/utils.js

+ 4 - 3
packages/ckeditor5-widget/src/utils.js

@@ -58,11 +58,12 @@ export function isWidget( element ) {
  * @returns {module:engine/view/element~Element} Returns same element.
  */
 export function toWidget( element, writer, options = {} ) {
-	// The selection on Edge behaves better when whole editor contents is in single contentedible element.
+	// The selection on Edge behaves better when the whole editor contents is in a single contentedible element.
 	// https://github.com/ckeditor/ckeditor5/issues/1079
 	if ( !env.isEdge ) {
 		writer.setAttribute( 'contenteditable', 'false', element );
 	}
+
 	writer.addClass( WIDGET_CLASS_NAME, element );
 	writer.setCustomProperty( widgetSymbol, true, element );
 	element.getFillerOffset = getFillerOffset;
@@ -159,13 +160,13 @@ export function getLabel( element ) {
 export function toWidgetEditable( editable, writer ) {
 	writer.addClass( [ 'ck-editor__editable', 'ck-editor__nested-editable' ], editable );
 
-	// The selection on Edge behaves better when whole editor contents is in single contentedible element.
+	// The selection on Edge behaves better when the whole editor contents is in a single contentedible element.
 	// https://github.com/ckeditor/ckeditor5/issues/1079
 	if ( !env.isEdge ) {
 		// Set initial contenteditable value.
 		writer.setAttribute( 'contenteditable', editable.isReadOnly ? 'false' : 'true', editable );
 
-		// Bind contenteditable property to element#isReadOnly.
+		// Bind the contenteditable property to element#isReadOnly.
 		editable.on( 'change:isReadOnly', ( evt, property, is ) => {
 			writer.setAttribute( 'contenteditable', is ? 'false' : 'true', editable );
 		} );