Make WordPress Core

Opened 11 years ago

Last modified 10 years ago

#22785 closed defect (bug)

Gallery placeholder buttons sometimes appear overlaid on the wrong editor — at Version 1

Reported by: helenyhou's profile helenyhou Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: Media Keywords:
Focuses: Cc:

Description (last modified by helenyhou)

If you have multiple visual editors on a screen, the edit/remove buttons that overlay on the gallery placeholder can appear in the right position, but in the wrong editor. If you click the edit button that appeared in the wrong place, the new-to-3.5 media modal shows the image set for the previously clicked placeholder. To reproduce:

  • Enable a second editor. Code (edit_form_after_editor is new to 3.5):
    add_action( 'edit_form_after_editor', 'hhs_edit_form_after_editor' );
    function hhs_edit_form_after_editor() {
    	wp_editor( '', 'hhs_test_editor' );
    }
    
  • Insert a gallery or two into one of the editors.
  • Click inside the editor without the galleries.
  • Single click a gallery placeholder in the other. Note that the buttons appear overlaid on the gallery-less editor.

Double clicking a placeholder will bring the buttons to the right place. Clicking within the same editor instance keeps the buttons in the right place. It seems specific to clicking a placeholder in an editor that did not previously have focus, including on page load. On page load, clicking a placeholder in the first (top) editor seems to show the buttons in the lower editor, whereas clicking a placeholder in the lower editor works just fine.

Reproduced in 3.4.2. Probably goes back farther. It probably wouldn't have been noticed in 3.4.2 since the old modal wouldn't have displayed much of anything differently.

Change History (1)

#1 @helenyhou
11 years ago

  • Description modified (diff)

Reported here, in the context of the button displaying stuff for the wrong gallery: http://wordpress.org/support/topic/gallery-shortcode-problems-with-multiple-tinymce-editors-in-35?replies=1

Note: See TracTickets for help on using tickets.