Page 1 of 1

Bugfix for Fullscreen Plugin

PostPosted: Sun Apr 11, 2010 8:21 am
by gerd.riesselmann
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

Re: Bugfix for Fullscreen Plugin

PostPosted: Sun Apr 11, 2010 3:41 pm
by mr_lundis
I've integrated your fixes and I also took care of the issues you mentioned. See r656 and r657.

Thank you for contributing!

Re: Bugfix for Fullscreen Plugin

PostPosted: Sun Apr 11, 2010 6:48 pm
by gerd.riesselmann
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.

Re: Bugfix for Fullscreen Plugin

PostPosted: Sun Apr 11, 2010 7:58 pm
by mr_lundis
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...

Re: Bugfix for Fullscreen Plugin

PostPosted: Sun Apr 11, 2010 8:51 pm
by gerd.riesselmann
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