Ticket #38 (new defect)
Calculate size for hidden editors
| Reported by: | holtwickd | Owned by: | gogo |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Xinha Core | Version: | |
| Severity: | minor | Keywords: | size |
| Cc: | mokhet@… |
Description (last modified by mokhet) (diff)
Especially Mozilla isn't very aware of sizes of hidden HTML elements. Therefore it shows some strange behaviours if you show up a hidden editor. My suggestion: Calculate sizes if available, otherwise use fix sizes.
Here's a simple example:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example of Xinha</title>
<link rel="stylesheet" href="full_example.css" />
<script type="text/javascript">
_editor_url = "../"; // This is a path to the base xinha directory.
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="../htmlarea.js"></script>
<script type="text/javascript">
var editor;
xinha_init = function()
{
editor = new HTMLArea("myTextArea");
editor.generate();
}
window.onload = xinha_init;
</script>
</head>
<body onload="xinha_init()">
<a href="#" onclick="document.getElementById('editors_here').style.display = 'block'; return false">
Show hidden form ...
</a>
<form id="editors_here" style="display:none">
<p>Editors:</p>
<textarea id="myTextArea" name="myTextArea" rows="10" cols="80" style="width:100%">
Test
</textarea>
</form>
</body>
</html>
Change History
Note: See
TracTickets for help on using
tickets.
