File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
editor/modes/visual-editor Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ registerBlock( 'core/quote', {
4242
4343 edit ( { attributes, setAttributes, focus, setFocus } ) {
4444 const { value, citation, style = 1 } = attributes ;
45+ const focusedEditable = focus ? focus . editable || 'value' : null ;
4546
4647 return (
4748 < blockquote className = { `blocks-quote blocks-quote-style-${ style } ` } >
@@ -52,7 +53,7 @@ registerBlock( 'core/quote', {
5253 value : nextValue
5354 } )
5455 }
55- focus = { focus && focus . editable === 'value' ? focus : null }
56+ focus = { focusedEditable === 'value' ? focus : null }
5657 onFocus = { ( ) => setFocus ( { editable : 'value' } ) }
5758 showAlignments
5859 />
@@ -65,7 +66,7 @@ registerBlock( 'core/quote', {
6566 citation : nextCitation
6667 } )
6768 }
68- focus = { focus && focus . editable === 'citation' ? focus : null }
69+ focus = { focusedEditable === 'citation' ? focus : null }
6970 onFocus = { ( ) => setFocus ( { editable : 'citation' } ) }
7071 />
7172 </ footer >
Original file line number Diff line number Diff line change @@ -145,13 +145,15 @@ class VisualEditorBlock extends wp.element.Component {
145145 < div
146146 ref = { this . bindBlockNode }
147147 onClick = { onSelect }
148+ onFocus = { onSelect }
148149 onBlur = { this . maybeDeselect }
149150 onKeyDown = { onStartTyping }
150151 onMouseEnter = { onHover }
151152 onMouseMove = { this . maybeHover }
152153 onMouseLeave = { onMouseLeave }
153154 className = { className }
154155 data-type = { block . blockType }
156+ tabIndex = "0"
155157 { ...wrapperProps }
156158 >
157159 { ( ( isSelected && ! isTyping ) || isHovered ) && < BlockMover uid = { block . uid } /> }
You can’t perform that action at this time.
0 commit comments