Skip to content
Open
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions src/js/media/views/attachments/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
},
Expand Down
Loading