WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#46062 closed defect (bug) (fixed)

TinyMCE Classic Block: fix repositioning of the inline toolbar on scroll

Reported by: azaozz Owned by: azaozz
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.0
Component: TinyMCE Keywords: has-patch commit
Focuses: Cc:

Description

In a TinyMCE instance the inline toolbars (like the Add/Edit Link toolbar) are hidden on scroll-start and repositioned and shown on scroll-end. This stopped working in the Classic Block instance as the scrolling element there is a container div, not the document/window (and the scroll event doesn't propagate).

Attachments (2)

46062.diff (620 bytes) - added by azaozz 8 months ago.
46062.1.diff (1.1 KB) - added by azaozz 8 months ago.

Download all attachments as: .zip

Change History (7)

@azaozz
8 months ago

#1 @azaozz
8 months ago

In 46062.diff: add another scroll handler to the wordpress TinyMCE plugin to hide and/or reposition the inline toolbars in Classic Block instances.

@azaozz
8 months ago

#2 @azaozz
8 months ago

After chatting with @iseulde, we can set capture for the scroll event and attach the listener to the document. That'd work better, see 46062.1.diff. Also added detaching of that listener.

#3 @azaozz
8 months ago

  • Keywords has-patch added

Tested in Firefox, Chrome and Edge on Win10.

#4 @iseulde
8 months ago

  • Keywords commit added

Looks good to me!

#5 @azaozz
8 months ago

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

In 44697:

TinyMCE Classic Block: fix repositioning of the inline toolbar on scrolling.

Props iseulde, azaozz.
Fixes #46062.

Note: See TracTickets for help on using tickets.