From e85aa9814babb44749649c21eeca057c6c6c3cbe Mon Sep 17 00:00:00 2001 From: Matt Chowning Date: Sun, 14 Apr 2019 20:29:38 -0400 Subject: [PATCH] Update image caption tagname from p to figcaption This change brings mobile's handling of image captinos in line with the web. It also addresses a crash that was occurring when the enter key was tapped to enter a new line in an image caption. --- packages/block-library/src/image/edit.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index 83d0c34126a00..dd61c6eb92254 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -425,7 +425,7 @@ class ImageEdit extends React.Component { setRef={ ( ref ) => { this._caption = ref; } } - tagName="p" + tagName="figcaption" placeholder={ __( 'Write caption…' ) } value={ caption } onChange={ ( newCaption ) => setAttributes( { caption: newCaption } ) }