WordPress.org

Make WordPress Core

#22463 closed enhancement (fixed)

Gallery overlay controls disappearing

Reported by: johnbillion Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4
Component: Editor Keywords: has-patch commit
Focuses: Cc:

Description

If you've inserted a gallery into your post and you click the gallery placeholder in the Visual editor, the 'Edit Gallery' and 'Delete Gallery' buttons appear, but they disappear again after about 4 seconds. They should be persistent while the gallery placeholder is selected.

Attachments (2)

22463.patch (1.2 KB) - added by SergeyBiryukov 17 months ago.
22463-2.patch (570 bytes) - added by azaozz 17 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 SergeyBiryukov17 months ago

  • Version changed from trunk to 3.4

Reproduced in 3.4.2 as well.

comment:2 nacin17 months ago

  • Milestone changed from Awaiting Review to 3.5

Would be a good thing to fix. Should be a matter of removing the timeout (and probably just always showing them).

SergeyBiryukov17 months ago

comment:3 SergeyBiryukov17 months ago

  • Keywords has-patch added

comment:4 koopersmith17 months ago

  • Owner set to koopersmith
  • Resolution set to fixed
  • Status changed from new to closed

In 22652:

Media: Make TinyMCE attachment and gallery controls always show when the corresponding view is selected. props SergeyBiryukov. fixes #22463, see #21390.

comment:5 azaozz17 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This shows these buttons even when the new media modal is opened and as they have higher z-index, they are on top.

To truly hide the buttons when a gallery or an image is deselected, this would need to be looking at blur for the image which is a bit tricky in contenteditable.

Last edited 17 months ago by azaozz (previous) (diff)

comment:6 azaozz17 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 22857:

TinyMCE: improve hiding of the image/gallery popup buttons, fix selecting a gallery in IE, don't leave empty paragraph after deleting an image with the popup button, fixes #22463, see #21390

comment:7 azaozz17 months ago

Uh, my bad. Should have added a patch as we are in RC :(

If we are changing when the popup buttons are shown, perhaps can show them on mouseover (after short delay)? That will ensure hiding them on mouseout. Another option would be to always show them although that won't look very good on images.

comment:8 azaozz17 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

_hideButtons() uses tinymce.DOM.hide() and passes an array with element IDs to it, however if none of the elements exist on the page, it throws an error.

azaozz17 months ago

comment:9 azaozz17 months ago

22463-2.patch fixes _hideButtons() by using Sizzle to pre-select the elements.

comment:10 nacin17 months ago

  • Keywords commit added

comment:11 nacin17 months ago

Also tested by SergeyBiryukov.

comment:12 nacin17 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 22883:

Editor: When hiding gallery/image editing buttons, use Sizzle rather than TinyMCE's internal DOM object. Avoids errors in case the elements do not exist, such as in Press This. props azaozz. fixes #22463.

Note: See TracTickets for help on using tickets.