Forum closed. New forum available at http://community.wymeditor.org/

Bugfix for Fullscreen Plugin

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Bugfix for Fullscreen Plugin

Postby gerd.riesselmann on Sun Apr 11, 2010 8:21 am

Hi,

the fullscreen plugin currently does not full schreen the input area, but the surrouding divs only. I talked about this with Mr. Lundis a while ago.

I now managed to figure out that with the new skins, it's the iframe that must be changed in height, not the wyn._box, which will adjust automatically.

My current version of the plugin is attached.

There still are a couple of problems, though:

a) Resizing: When the browser window is resized, the size of full size WYMEditor stays the same
b) Source View: Source view is still 200px. If it pops up, the iframe moves down, but no scrollbars appear.
c) The iframe's height is set to screen - 100px, which may not be sufficient for all skin layouts. To solve this problem, skins should be able to resize themselves, I guess.

Best regards,

Gerd
Attachments
jquery.wymeditor.fullscreen.js.zip
(1.21 KiB) Downloaded 987 times
gerd.riesselmann
 
Posts: 3
Joined: Sun Apr 11, 2010 8:11 am

Re: Bugfix for Fullscreen Plugin

Postby mr_lundis on Sun Apr 11, 2010 3:41 pm

I've integrated your fixes and I also took care of the issues you mentioned. See r656 and r657.

Thank you for contributing!
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Bugfix for Fullscreen Plugin

Postby gerd.riesselmann on Sun Apr 11, 2010 6:48 pm

Wow, great work! And works like a charm!

There is still a bug, though: removing the inline styles from the iframe on closing the full screen view won't work, if the iframe's height has already been modified. Like this:

Code: Select all
$("textarea.wymeditor").wymeditor({
    ...
    postInit: function(wym) {
        $(wym._iframe).css('height', $(wym._element).height());
    }
});


This code sets the iframe's height to the height of the textarea replaced.

That's why I stored the iframe's height when creating full screen and restored it on closing.
gerd.riesselmann
 
Posts: 3
Joined: Sun Apr 11, 2010 8:11 am

Re: Bugfix for Fullscreen Plugin

Postby mr_lundis on Sun Apr 11, 2010 7:58 pm

You've got me jumping through hoops on this one. ;)

It's always problematic to use inline styles, and I was afraid that something like this might occur. But I think I've found a simple solution that should work in most cases. Now, the value of the style attribute is stored when you enter full screen mode, and then restored when you leave it. See r659.

Edit: If someone feels like testing this out in IE it'd be appreciated. I don't have the energy to boot up Windows XP for the third time today...
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Bugfix for Fullscreen Plugin

Postby gerd.riesselmann on Sun Apr 11, 2010 8:51 pm

mr_lundis wrote:You've got me jumping through hoops on this one. ;)


Sorry for the inconvenience :lol: The plugin works fine now, great work!

As for IE6: Bad News. I tested it, and it's screwed up.

This is due to IE6 not supporting position: fixed. The workaround is to

- position $overlay absolute
- position $box absolute
- call $overlay.append($box), so $box is positioned absolute to screen, not its current position. This is the most ugliest, since its difficult to undo, I think.

Second, IE6 has problems with opacity. Opacity is applied to every element with a z-index higher or the same as the element that got the opacity. Which in this case makes the WYMEditor box itself opaque. Work around is either a translucent image (as far as I remember) or to set opacity to 1 on $overlay.

I personally would suggest to simply disable this plugin for IE6. :D
gerd.riesselmann
 
Posts: 3
Joined: Sun Apr 11, 2010 8:11 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest