Opened 5 years ago
Closed 5 years ago
#43984 closed defect (bug) (fixed)
Customize: JavaScript error when opening Text widget
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9.6 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | TinyMCE | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
All that should be needed to replicate is to try to expand a Text widget in the Customizer.
The error is Uncaught TypeError: Cannot read property 'zIndex' of undefined
, and it occurs here: https://github.com/WordPress/wordpress-develop/blob/6d2bcaa9b39264e5bc8145cf8895f303cabf3fcd/src/wp-admin/js/customize-controls.js#L9256. The error prevents the visual editor from loading.
I think the error began with the TinyMCE update in #43862. Unfortunately, I'm not sure where to begin looking within those changes for what the cause might be.
Attachments (1)
Change History (9)
#2
follow-up:
↓ 5
@
5 years ago
- Keywords has-patch added; needs-patch removed
My proposed patch currently takes care about the error message and prevents it from popping up on the console.
However, I believe why window.tinymce.ui.FloatPanel
is showing undefined
is more likely to be the area to inspect.
#5
in reply to:
↑ 2
@
5 years ago
Replying to subrataemfluence:
However, I believe why
window.tinymce.ui.FloatPanel
is showingundefined
is more likely to be the area to inspect.
Right, seems the wp-before-tinymce-init
event fires too early. Switching to tinymce-editor-setup
(fired when the wordpress
plugin starts to load) fixes it.
Going to commit this for easier testing, also pinging @westonruter to have a look if possible.
I could reproduce the issue.
Since
window.tinymce.ui.FloatPanel
is undefined,window.tinymce.ui.FloatPanel.zIndex
is throwing the above error, i.e.zIndex of undefined
. I am trying to find out.Source file:
Line #: 9259
Code block: