Make WordPress Core

Opened 3 years ago

Closed 3 years ago

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


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 3 years ago.
22463-2.patch (570 bytes) - added by azaozz 3 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 @SergeyBiryukov3 years ago

  • Version changed from trunk to 3.4

Reproduced in 3.4.2 as well.

comment:2 @nacin3 years 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).

@SergeyBiryukov3 years ago

comment:3 @SergeyBiryukov3 years ago

  • Keywords has-patch added

comment:4 @koopersmith3 years 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 @azaozz3 years 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 x-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.

Version 0, edited 3 years ago by azaozz (next)

comment:6 @azaozz3 years 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 @azaozz3 years 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 @azaozz3 years 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.

@azaozz3 years ago

comment:9 @azaozz3 years ago

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

comment:10 @nacin3 years ago

  • Keywords commit added

comment:11 @nacin3 years ago

Also tested by SergeyBiryukov.

comment:12 @nacin3 years 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.