diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js index 26218ea2fa1ae..dd6f35bb86350 100644 --- a/src/js/media/views/attachments/browser.js +++ b/src/js/media/views/attachments/browser.js @@ -719,8 +719,11 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro }) ); } - // Show the sidebar on mobile. - if ( this.model.id === 'insert' ) { + // Show the sidebar on mobile for flows that surface attachment + // metadata (alt text, caption, description) in the sidebar. Without + // this, the sidebar is positioned off-screen on narrow viewports + // and the metadata fields are unreachable. + if ( [ 'insert', 'featured-image', 'replace-image', 'gallery-edit', 'gallery-library' ].includes( this.model.id ) ) { sidebar.$el.addClass( 'visible' ); } },