WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#53632 closed defect (bug) (fixed)

TinyMCE not working in the customizer until it clicked

Reported by: Collizo4sky Owned by: azaozz
Milestone: 5.8 Priority: normal
Severity: major Version: 5.8
Component: TinyMCE Keywords: fixed-major commit dev-reviewed
Focuses: ui, javascript, administration Cc:

Description

I use this customizer control to add a tinymce editor to the customizer for my plugin MailOptin.

Now I have to click on the Tinymce before the it is initialized.

Here's a GIF of the issue https://share.getcloudapp.com/P8u9rkxJ

It works perfectly in WP versions prior to 5.8.

Attachments (1)

53632.diff (1.2 KB) - added by azaozz 3 months ago.

Download all attachments as: .zip

Change History (9)

#1 @azaozz
3 months ago

  • Component changed from Customize to TinyMCE
  • Milestone changed from Awaiting Review to 5.8

This may have something to do with [51082]. As far as I see TinyMCE is initialized by the click on the "Visual" tab, not when the js is supposedly running.

Moving to 5.8 for further investigation.

#2 @Collizo4sky
3 months ago

You are right. TinyMCE is initialized when the visual tab is clicked.

I'll be watching this ticket for update.

Thanks for acknowledging it.

@azaozz
3 months ago

#3 @azaozz
3 months ago

In 53632.diff: ensure tinymce.init() runs in all cases on 'interactive' and 'complete' readyState.

@Collizo4sky please test the patch asap if you can.

#4 @Collizo4sky
3 months ago

Worked perfectly.

Thank you @azaozz

#5 @azaozz
3 months ago

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

In 51402:

TinyMCE: ensure initialization runs in all cases on 'interactive' and 'complete' readyState. Fixes a rare bug when the init code is inserted in the DOM after the page has finished loading.

Props Collizo4sky, azaozz.
Fixes #53632.

#6 @azaozz
3 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for the 5.8 branch.

#7 @desrosj
3 months ago

  • Keywords commit dev-reviewed added

[51402] looks good to backport.

#8 @desrosj
3 months ago

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

In 51407:

TinyMCE: ensure initialization runs in all cases on 'interactive' and 'complete' readyState.

Fixes a rare bug when the init code is inserted in the DOM after the page has finished loading.

Props Collizo4sky, azaozz.
Merges [51402] to the 5.8 branch.
Fixes #53632.

Note: See TracTickets for help on using tickets.