diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js
index 432fbd5baaef5..f48ef007115dd 100644
--- a/editor/modes/visual-editor/block.js
+++ b/editor/modes/visual-editor/block.js
@@ -5,10 +5,12 @@ import { connect } from 'react-redux';
import classnames from 'classnames';
import { Slot } from 'react-slot-fill';
import { partial } from 'lodash';
+import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
/**
* WordPress dependencies
*/
+import { Children } from 'element';
import Toolbar from 'components/toolbar';
/**
@@ -33,6 +35,11 @@ import {
isTypingInBlock,
} from '../../selectors';
+function FirstChild( { children } ) {
+ const childrenArray = Children.toArray( children );
+ return childrenArray[ 0 ] || null;
+}
+
class VisualEditorBlock extends wp.element.Component {
constructor() {
super( ...arguments );
@@ -200,18 +207,27 @@ class VisualEditorBlock extends wp.element.Component {
>
{ ( showUI || isHovered ) &&