From 49a169e020857da751dddf3db68a13ca5b949c9e Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 17 Apr 2017 14:13:40 +0100 Subject: [PATCH] Fix splitting behaviour when we have some formatting --- blocks/components/editable/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blocks/components/editable/index.js b/blocks/components/editable/index.js index 3fa4cbd8cfe71..139d7a481ccbc 100644 --- a/blocks/components/editable/index.js +++ b/blocks/components/editable/index.js @@ -78,8 +78,7 @@ export default class Editable extends wp.element.Component { // Avoid splitting on single enter if ( ! lastNodeBeforeCursor || - lastNodeBeforeCursor.childNodes.length !== 1 || - lastNodeBeforeCursor.firstChild.tagName !== 'BR' + !! lastNodeBeforeCursor.textContent ) { return; }