Support

Account

Home Forums Bug Reports Z-index of 'Insert/Edit Link' modal

Unread

Z-index of 'Insert/Edit Link' modal

  • 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:

    1. Create a Wysywig field, set it to show on Attachments.
    2. Create an Image field, set that to show on a Post or Page.
    3. Navigate to a post/page, add an image to the Image field.
    4. Hover over the image, click the edit(pencil) icon.
    5. 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

Viewing 1 post (of 1 total)

The topic ‘Z-index of 'Insert/Edit Link' modal’ is closed to new replies.