Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
TinyMCE 3.2.7, clicking page break button won't insert page break (does nothing) in full screen mode, works as expected when not in full screen mode.
Comment | File | Size | Author |
---|---|---|---|
#3 | wysiwyg-606952-fullscreen-2.patch | 2.38 KB | TwoD |
#1 | wysiwyg-606952-fullscreen.patch | 1.4 KB | TwoD |
Comments
Comment #1
TwoDTinyMCE creates a completely different editor for fullscreen mode and does not relay changes made to the original editor to the new one. We explicitly state which instance we want the inserted content to go to, so we must check to see if there's an active fullscreen editor and if it was created based on the correct instance.
Here's a patch to 6.x-2.x-dev to fix that. It can be applied to 2.0 as well.
Thanks for finding and reporting this issue.
Comment #2
Internetter CreditAttribution: Internetter commentedPlease look at the functions openDialog() and closeDialog(). These should also get the "fullscreen" check. Perhaps it is possible to set this.field right, if tinymce is in fullscreen-mode.
Here are fragment, sorry not complete patch. ;-(
bye Martin
Comment #3
TwoDUpdated patch, adds a new
isFullscreen()
method to the tinyMCE implementation.I hope the ternary operators are clear enough.
Comment #4
sgabe CreditAttribution: sgabe commentedI created a wysiwyg plugin based on the API documentation and the break plugin example in the module and discovered this bug. The break plugin didn't work in full screen mode, my plugin neither. Patch in #1 solved the problem, but the latest patch in #3 didn't work at all. The whole editor disappeared after the patch...
Comment #5
TwoDI re-tested the #3 patch with the latest -dev snapshot and TinyMCE 3.3b2 and it applies correctly (with a 3-row offset due to the recently committed TinyMCE 3.3 support patch) and I'm able to use Teaser Break in fullscreen mode.
Do you see any JavaScript errors?
If not, could you perhaps try setting a few brekpoints with Firebug for FF to see if the attach() method in wysiwyg/editors/js/tinymce-3.js i executed correctly?
Comment #6
sgabe CreditAttribution: sgabe commentedI checked the latest 6.x-dev from CVS, applied your patch again and now it works fine. Think I've mistaken. Thanks!
Comment #7
JGO CreditAttribution: JGO commentedIndeed, everything is working fine thanks to this patch!!
Comment #8
TwoDI think #6 and #7 makes this RTBC, doesn't it?
Aside from the trailing space after isFullscreen(), I can't find any syntax bloopers either.
Comment #9
sgabe CreditAttribution: sgabe commentedI can confirm this as RTBC.
Comment #10
TwoDPatch in #3 committed to all branches.
The fix will be in -dev snapshots soon and will be part of the next stable release.
Thank you all for reviewing, testing and commenting!
Comment #11
sunMinor note (mainly for TwoD): Whenever we do inline-ifs (or more officially: when using the ternary operator), then the entire expression should be wrapped in parenthesis; e.g.:
Doing so helps to prevent unexpected bugs and heavily clarifies the code for people that happen to read it. Thanks! :)
Powered by Dreditor.
Comment #12
TwoDOh, right, thanks!