Piotrek Koszuliński преди 7 години
родител
ревизия
1fe8ea92f3
променени са 2 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 1 0
      packages/ckeditor5-typing/src/utils.js
  2. 6 3
      packages/ckeditor5-typing/src/utils/injectandroidbackspacemutationshandling.js

+ 1 - 0
packages/ckeditor5-typing/src/utils.js

@@ -72,6 +72,7 @@ export function getSingleTextNodeChange( mutation ) {
  * Checks whether two view nodes are identical, which means they are the same object
  * or contain exactly same data (in case of text nodes).
  *
+ * @private
  * @param {module:engine/view/node~Node} oldChild
  * @param {module:engine/view/node~Node} newChild
  * @returns {Boolean}

+ 6 - 3
packages/ckeditor5-typing/src/utils/injectandroidbackspacemutationshandling.js

@@ -4,7 +4,7 @@
  */
 
 /**
- * @module typing/utils/injectAndroidBackspaceMutationsHandling
+ * @module typing/utils/injectandroidbackspacenutationshandling
  */
 
 import Selection from '@ckeditor/ckeditor5-engine/src/model/selection';
@@ -13,7 +13,10 @@ import diff from '@ckeditor/ckeditor5-utils/src/diff';
 import { containerChildrenMutated } from '../utils';
 
 /**
- * Handles mutations responsible for block elements removal generated by `Backspace` key on Android.
+ * Handles mutations triggered by <kbd>Backspace</kbd> on Android.
+ * Due to the fact that on Android `keydown` events don't have the `keyCode` set, we are not able
+ * to handle backspacing directly. We need to guess that from mutations which the IME
+ * on Android caused.
  *
  * @param {module:core/editor/editor~Editor} editor The editor instance.
  */
@@ -157,7 +160,7 @@ function containsContainersRemoval( mutations ) {
 // Whether provided array contains only nodes of `containerElement` type.
 //
 // @private
-// @param {Array.<module:engine/model/node~Node>} children
+// @param {Array.<module:engine/view/node~Node>} children
 // @returns {Boolean}
 function hasOnlyContainers( children ) {
 	return children.every( child => child.is( 'containerElement' ) );