Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#22785 closed defect (bug) (invalid)

Gallery placeholder buttons sometimes appear overlaid on the wrong editor

Reported by: helen's profile helen 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 (3)

#1 @helenyhou
11 years ago

  • Description modified (diff)

Reported here, in the context of the button displaying stuff for the wrong gallery:

#2 @helen
11 years ago

  • Reporter changed from helenyhou to helen

#3 @helen
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I have not seen this happen since the view changes in 3.9. Closing out.

Note: See TracTickets for help on using tickets.