After after adding a Wysywig field to attachments, I noticed a CSS bug when trying to access the ‘Insert/Edit Link’ modal while within an ‘Edit Media’ modal. The ‘Insert/Edit Link’ Modal will be hidden due to having a lower z-index value then the ‘Edit Media’ modal.
Steps to reproduce:
- Create a Wysywig field, set it to show on Attachments.
- Create an Image field, set that to show on a Post or Page.
- Navigate to a post/page, add an image to the Image field.
- Hover over the image, click the edit(pencil) icon.
- Try to add a link in the Wysywig field while in the Edit Media modal.
My fix is below:
add_action('admin_head', 'fix_tinymce_on_attachments');
function fix_tinymce_on_attachments() {
echo '<style>
.wp-admin #wp-link-backdrop {
z-index:160001;
}
.wp-admin #wp-link-wrap.wp-core-ui {
z-index:160002;
}
</style>';
}
Also posted here: http://wordpress.org/support/topic/z-index-bug-on-edit-attachment-modal-view?replies=1