Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Initial fix for text insertion bugs in Android 5.1 #1033

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/component/handlers/edit/editOnInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ function editOnInput(editor: DraftEditor): void {
var domSelection = global.getSelection();

var {anchorNode, isCollapsed} = domSelection;
if (anchorNode.nodeType !== Node.TEXT_NODE) {

const isNotTextOrElementNode = anchorNode.nodeType !== Node.TEXT_NODE
&& anchorNode.nodeType !== Node.ELEMENT_NODE;
if (isNotTextOrElementNode) {
return;
}

Expand Down