Opened 11 years ago
Closed 11 years ago
#27605 closed defect (bug) (fixed)
WP Editor link dialog content visible before Tiny MCE is initialized
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Editor | Keywords: | has-patch commit dev-reviewed |
Focuses: | ui | Cc: |
Description
To reproduce:
- Add a tinyMCE using
wp_editor()
to an options page, inside a hidden element. - The content of the editor link dialog is displayed at the bottom of the page. See screenshot below.
- When the hidden element is shown, initialize the editor. The link dialog content disappears.
This happens because the link dialog is hidden using CSS found in editor.css.
This is not loaded until the TinyMCE editor is initialized, so until this point the content is visible, but unstyled.
This patch fixes this bug by hiding the wp-link-wrap element using an inline style so it is not visible on page load.
Attachments (3)
Change History (12)
This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.
11 years ago
#4
@
11 years ago
mattheu, could you supply some code to trigger this? This is not easy to reproduce.
#5
@
11 years ago
The issue came to light whilst testing this plugin: https://github.com/humanmade/Custom-Meta-Boxes
However I have uploaded some code that allows you to reproduce the issue easily.
I was actually slightly mistaken in my original description.
Load the page with editor visible.
The issues occurs when you remove an editor and the editor stylesheet also.
I realize this is pretty edge case... and I would be happy to allow for it in my plugin. However as this did not occur on 3.8, I thought it was worth raising!
#6
@
11 years ago
After testing this, it seems like the CSS file should be printed before the editor wrap div. However, in the example posted, it's clear that a custom container is removed, not what gets printed, which would include the CSS file either way.
I'm fine with this, but in order for it to not regress, I'd like there to be a comment of some sort.
Another note to make: class="hidden" won't work on the frontend, so we resort to an inline style.
Yes, wpLink used to have an inline style in 3.8. The patch has a typo, missing a
>
.