|
|
@@ -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' ) );
|