From 39c036408c5d286c2937ede714a5c189a0593610 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Mon, 19 Apr 2004 14:12:51 +0000 Subject: [PATCH] ie textarea fixes --- stylesheets/IEFixes.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/stylesheets/IEFixes.js b/stylesheets/IEFixes.js index 25991cc611..a9a7428c14 100644 --- a/stylesheets/IEFixes.js +++ b/stylesheets/IEFixes.js @@ -1,13 +1,20 @@ // IE fix javascript +var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); +if (rslt != null ) var version = Number(rslt[1]); +else var version = 0; -// png alpha transparency fixes -window.attachEvent("onload", fixalpha); +window.attachEvent("onload", hookit); +function hookit() { + fixalpha(); + fixtextarea(); + var wrapper = document.getElementById('tawrapper'); + if(wrapper) wrapper.attachEvent("onclick", fixtextarea); +} +// png alpha transparency fixes function fixalpha(){ // bg - var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); - if (rslt != null && Number(rslt[1]) >= 5.5) - { + if(version >= 5.5) { var logoa = document.getElementById('portlet-logo').firstChild; var bg = logoa.currentStyle.backgroundImage; if (bg.match(/\.png/i) != null){ @@ -35,3 +42,11 @@ function fixalpha(){ }*/ } } + +function fixtextarea() { + var wrapper = document.getElementById('tawrapper'); + if(wrapper) { + wrapper.style.width = 'auto'; + wrapper.style.width = (wrapper.offsetWidth - 4) + 'px'; + } +} -- 2.20.1