diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-07-31 21:28:07 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-07-31 21:28:07 +0200 |
commit | 0d35318916bc5b232dfc3532db0efb26f0af7f22 (patch) | |
tree | d6dcd8aeede9b5437cdeeac10c44bcf9252cdf7b /lib/scripts | |
parent | 18d694935e0cce27c377e9edf7bd8904e69c1d87 (diff) | |
download | rpg-0d35318916bc5b232dfc3532db0efb26f0af7f22.tar.gz rpg-0d35318916bc5b232dfc3532db0efb26f0af7f22.tar.bz2 |
spellchecker CSS changes #539 #824
This patch now assigns the needed proprietary CSS attributes for the spellchecker
through JavaScript. This makes the CSS valid again (at least it appears to be ;-))
I also fixed a problem with leading single spaces in IE
darcs-hash:20060731192807-7ad00-b82bdcae9a0c8cf063c3a1e985dbfd1dfdee7b06.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r-- | lib/scripts/spellcheck.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/scripts/spellcheck.js b/lib/scripts/spellcheck.js index e00512010..73b392f5b 100644 --- a/lib/scripts/spellcheck.js +++ b/lib/scripts/spellcheck.js @@ -120,6 +120,21 @@ function ajax_spell_class(){ this.showboxObj = document.getElementById('spell__result'); this.suggestObj = document.getElementById('spell__suggest'); + + // set wordwrap style with browser propritary attributes + if(is_gecko){ + this.showboxObj.style.whiteSpace = '-moz-pre-wrap'; // Mozilla, since 1999 + }else if(is_opera_preseven){ + this.showboxObj.style.whiteSpace = '-pre-wrap'; // Opera 4-6 + }else if(is_opera_seven){ + this.showboxObj.style.whiteSpace = '-o-pre-wrap'; // Opera 7 + }else{ + this.showboxObj.style['word-wrap'] = 'break-word'; //Internet Explorer 5.5+ + } + // Which browser supports this? + // this.showboxObj.style.whiteSpace = 'pre-wrap'; // css-3 + + // set Translation Strings this.txtStart = txtStart; this.txtStop = txtStop; |