#22755 closed defect (bug) (fixed)
Re-adding TinyMCE to textarea renders visual editor invisible - fixed upstream
Reported by: | Marko-M | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
Wordpress 3.5 RC3 includes TinyMCE 3.5.7. TinyMCE doesn't like to be moved around in DOM and this can be solved only by removing TinyMCE from element before any DOM manipulation. Unfortunately TinyMCE 3.5.7. contains bug that prevents removing TinyMCE instance before doing DOM manipulation and then re-adding it back. Bug is that re-adding TinyMCE causes visual editor span to have "display: none;" CSS appended (becomes invisible).
Here's link to official bug report and solution:
http://www.tinymce.com/develop/bugtracker_view.php?id=5510
There is also link to commit that fixes this problem:
https://github.com/tinymce/tinymce/commit/a12d6859e81408b12c956c3504b1fe7ff35aabae
Bug has been fixed upstream. I can also confim that issue has been resolved in TinyMCE 3.5.8 version. It would be great if this could make into WordPress 3.5.
Attachments (1)
Change History (11)
#2
@
12 years ago
TinyMCE has *always* had DOM movement issues, so I wouldn't mind too much if this waited for 3.6. Or was this hiding aspect new in 3.5.7?
Here's a full changelog of 3.5.8 (with my commentary) —
- Fixed bug where html5 data attributes where stripped from contents. (This is bad, but does this apply to us?)
- Fixed bug where toolbar was annouced multiple times with JAWS on Firefox. (Nice fix.)
- Fixed bug where the editor view whouldn't scroll to BR elements when using shift+enter or br enter mode. (This sounds like it would affect us, but is minor.)
- Fixed bug where a JS error would be thrown when trying to paste table rows then the rows clipboard was empty. (WP's TinyMCE Advanced only, sounds like.)
- Fixed bug with auto detection logic for youtube urls in the media plugin. (Media plugin only.)
- Fixed bug where the formatter would throw errors if you used the jQuery version of TinyMCE and the latest jQuery. (We don't use this version, correct?)
- Fixed bug where the latest WebKit versions would produce span elements when deleting text between blocks. (Yeah, that's no fun.)
- Fixed bug where the autolink plugin would produce DOM exceptions when pressing shift+enter inside a block element. (We don't use this plugin.)
- Fixed bug where toggling of blockquotes when using br enter mode would produce an exception. (Do we use br enter mode?)
- Fixed bug where focusing out of the body of the editor wouldn't properly add an undo level. (?)
- Fixed issue with warning message being displayed on IE 9+ about the meta header fix for IE 8. (No idea what this is.)
I don't even see this commit referenced in the changelog. The one that bothers me is the stripping of HTML5 data attributes.
#3
@
12 years ago
Problem isn't anything new with moving in DOM, but in TinyMCE version 3.5.7 there is a bug that prevents us from detaching from DOM element and reattaching again to circumvent well known TinyMCE DOM manipulation issues. This hiding on reattach issue hasn't been present in TinyMCE 3.5.6 and isn't present in 3.5.8, so yes it is 3.5.7 specific. Any version except 3.5.7 would solve this issue.
#4
@
12 years ago
Does core use that method to unattach it and then reattach it anywhere? Or is this only for plugins that try it?
#5
follow-up:
↓ 6
@
12 years ago
Does core use that method to unattach it and then reattach it anywhere?
No.
#6
in reply to:
↑ 5
@
12 years ago
Replying to nacin:
Does core use that method to unattach it and then reattach it anywhere?
No.
I hope this will not eliminate this bug from being fixed for the next release because having to bundle own tinymce copy would complicate my life, as well as lives of other WordPress developers using that functionality. Whatever you decide, thanks for your work.
azaozz — your call on this one.