You are not logged in.
Pages: 1
Hi all, I am experiencing layout problems with xinha editors embedded in a scrolling div. Part of the iframe doesnt seem to scroll, instead the page grows to the size of the editors but only shows some "ghost" buttons. Cant put it on the web right now, hope someone can still point me in the right direction. Thanks.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title> </title>
<meta HTTP-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
_editor_url = "/module/xinha/";
_editor_lang = "de";
</script>
<script type="text/javascript" src="/module/xinha/XinhaCore.js"></script>
<script type="text/javascript" src="/module/xinha/rb_config.js"></script>
</head>
<body>
<script type="text/javascript">
xinha_editors = [ 'data271918', 'data271917', 'data271916', 'data271915' ];
</script>
<form>
<div style="overflow:auto;height:300px;">
<textarea id="data271918" style="width:600px;height:60px;"></textarea>
<textarea id="data271917" style="width:600px;height:150px;"></textarea>
<textarea id="data271916" style="width:600px;height:300px;"></textarea>
<textarea id="data271915" style="width:600px;height:90px;"></textarea>
</div>
</form>
</body>
</html>
The problem seems to be related to using the standard doctype, in quirks mode the behaviour seems to be correct. FF has no problems in either mode. However both ignore the height I've set for the textareas. Ive changed some config settings as follows.
xinha_config.height = 'auto';
xinha_config.width = 'auto';
xinha_config.getHtmlMethod = 1 ? "DOMwalk" : "TransformInnerHTML";
xinha_config.sizeIncludesBars = false;
xinha_config.sizeIncludesPanels = false;
xinha_config.statusBar = false;
xinha_config.browserQuirksMode = false;
Am I doing something wrong or should I submit a ticket?
Thanks.
-edit-
It seems the toolbar icons and iframes are somehow positioned absolutely in the body not in the div that contains the textareas and thus dont scroll when scrolling the div. However, they are repositioned when the window is resized. I "randomly" tried a changes in XinhaCore and found that removing the line
fw.ed_cell.style.position="relative";
will allow the iframes to be positioned corretly in both ie7/xp and ff/xp. Havent found anything similar for the toolbar icons though.
Last edited by Thaylon (2007-04-19 06:42:59)
Offline
To me it looks like a bug in ie with relatively positioned elements inside a scrolling div. I changed a few things in XinhaCore.js and it seems to work for me now. In ie6/2k, ie7/xp, ff/xp and with the limited functions of xinha that i have activated at least. If anyones interested these were the necessary changes.
728c728
< //_8a.style.position="relative";
---
> _8a.style.position="relative";
753c753
< //img.style.position="relative";
---
> img.style.position="relative";
758,766c758,759
< //img.style.top=_88[2]?("-"+(18*(_88[2]+1))+"px"):"-18px";
< //img.style.left=_88[1]?("-"+(18*(_88[1]+1))+"px"):"-18px";
<
< mytop=_88[2]?((18*(_88[2]+1))):18;
< myleft=_88[1]?((18*(_88[1]+1))):18;
< img.style.clip="rect("+(mytop)+"px "+(myleft+18)+"px "+(mytop+18)+"px "+myleft+"px)";
< img.style.overflow="hidden";
< img.style.marginLeft="-"+myleft+"px";
< img.style.marginTop="-"+mytop+"px";
---
> img.style.top=_88[2]?("-"+(18*(_88[2]+1))+"px"):"-18px";
> img.style.left=_88[1]?("-"+(18*(_88[1]+1))+"px"):"-18px";
949c942
< //fw.ed_cell.style.position="relative";
---
> fw.ed_cell.style.position="relative";
-edit-
*sigh* Forgot that I still dont get the correct sizes for iframes, there seems to be some kind of minimum height.
Last edited by Thaylon (2007-04-19 09:45:13)
Offline
this._iframe.style.height="100%";
Sets the iframe height to about 200px (ie7/xp, ff/xp) and wont resize to anything smaller than that. Changing that line to
this._iframe.style.height="1px";
fixed the height problems for me.
Offline
Pages: 1