Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
654eb22
Writing Flow: Collapse range in horizontal edge check by direction
aduth Apr 27, 2018
f7dcc8a
Try alternative approach
ellatrix Apr 30, 2018
bef44c3
Writing Flow: Move collapsed selection condition to WritingFlow
aduth May 2, 2018
a8728bf
Writing Flow: Vertical navigate from uncollapsed selections
aduth May 2, 2018
79fc388
Writing Flow: Use Selection#isCollapsed in place of hasCollapsedSelec…
aduth May 2, 2018
83d3ff7
Rich Text: Verify collapsed selection in delete behavior
aduth May 2, 2018
33184f9
Utils: Improve range rect detection for br-separated content
aduth May 2, 2018
f2ae9ef
Testing: Add Writing Flow E2E tests
aduth May 2, 2018
d81ac98
Try getRectangleFromRange fix without manipulating live DOM
ellatrix May 2, 2018
284900e
Utils: Update caret to selection in edge tests comments
aduth May 3, 2018
bc252af
Writing Flow: Invert position when isReverse not aligned to backward
aduth May 3, 2018
a961282
Try direct selection
ellatrix May 3, 2018
6431770
Only look at focusNode
ellatrix May 3, 2018
c0a0fc3
Utils: Document horizontal edge focusOffset
aduth May 3, 2018
b5a54df
Utils: Use temporary text node for rect fallback
aduth May 3, 2018
e087ddd
Writing Flow: Test horizontal navigation as handled
aduth May 3, 2018
7b174ad
Element: Fix Fragment render error on empty children
aduth May 10, 2018
a528868
Testing: Add global guard against ZWSP in E2E content retrieval
aduth May 10, 2018
d6f1ab9
RichText: Remove ZWSP on focusout
aduth May 10, 2018
4523390
RichText: Consider emptiness by Children count utility
aduth May 10, 2018
31596df
Writing Flow: Consider horizontal handled by stopPropagation in RichText
aduth May 10, 2018
fa4ad6d
RichText: Get content by converting tree node to element
aduth May 10, 2018
2afb649
Writing Flow: Consider as edge by effective caret position
aduth May 10, 2018
dab93de
Rich Text: Return element fragment as array
aduth May 10, 2018
9dde841
Testing: Attempt to resolve race conditions with TinyMCE initialization
aduth May 10, 2018
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
Prev Previous commit
Next Next commit
Rich Text: Return element fragment as array
May cause React to complain about lack of keys, but existing blocks map from value with expectation it's array (they probably shouldn't).
  • Loading branch information
aduth committed May 10, 2018
commit dab93de6ece99378b26e253f3f421b3b0f4d5ecd
10 changes: 6 additions & 4 deletions editor/components/rich-text/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { nodeListToReact } from 'dom-react';
/**
* WordPress dependencies
*/
import { Fragment, createElement, renderToString } from '@wordpress/element';
import { createElement, renderToString } from '@wordpress/element';

/**
* Browser dependencies
Expand Down Expand Up @@ -88,10 +88,12 @@ export function tinyMCENodeToElement( node ) {
child = child.next;
}

const tagName = node.type === Node.DOCUMENT_FRAGMENT_NODE ? Fragment : node.name;
const attributes = get( node.attributes, [ 'map' ], {} );
if ( node.type === Node.DOCUMENT_FRAGMENT_NODE ) {
return children;
}

return createElement( tagName, attributes, ...children );
const attributes = get( node.attributes, [ 'map' ], {} );
return createElement( node.name, attributes, ...children );
}

/**
Expand Down