refix textarea automatically on resize
authorGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 19 Apr 2004 16:41:02 +0000 (16:41 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 19 Apr 2004 16:41:02 +0000 (16:41 +0000)
stylesheets/IEFixes.js

index 0888561..e2c8534 100644 (file)
@@ -6,10 +6,15 @@ else var version = 0;
 window.attachEvent("onload", hookit);
 function hookit() {
     fixalpha();
-    if(version == 6) relativeforfloats();
-    fixtextarea();
-    var wrapper = document.getElementById('tawrapper');
-    if(wrapper) wrapper.attachEvent("onclick", fixtextarea);
+    if(version == 6) {
+        relativeforfloats();
+        fixtextarea();
+        var wrapper = document.getElementById('tawrapper');
+        if(wrapper) {
+            //wrapper.attachEvent("onclick", fixtextarea);
+            window.onresize = refixtextarea;
+        }
+    }
 }
 
 // png alpha transparency fixes
@@ -51,6 +56,9 @@ function fixtextarea() {
             wrapper.style.width = (wrapper.offsetWidth - 4)  + 'px';
     }
 }
+function refixtextarea () {
+    setTimeout("fixtextarea()",10);
+}
 
 // fix ie6 disappering float bug
 function relativeforfloats() {