diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-12 17:31:23 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-12 17:31:23 +0000 |
| commit | ca7e6afc99703003465bf3b63dc7aecda1be6fe5 (patch) | |
| tree | 22a47d1b53bbecc91ca6bd770b1e0ebe5744aed3 /roundcubemail/program/js | |
| parent | d5dd7852edd8b2f9fed6deb741c62cf3407151a1 (diff) | |
- getElementById() case-sensitive hack for IE
git-svn-id: https://svn.roundcube.net/trunk@1779 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/common.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 063657f89..649779746 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/program/js/common.js @@ -631,3 +631,29 @@ RegExp.escape = function(str) { return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); } + + +// Make getElementById() case-sensitive on IE +if (bw.ie) + { + document._getElementById = document.getElementById; + document.getElementById = function(id) + { + var a = []; + var o = document._getElementById(id); + + while (o.id != id) + { + a.push({i:o.id,e:o}); + o.id = ''; + o = document._getElementById(id); + if (!o) return o; + } + + for (j=0,jj=a.length; j<jj; j++) + a[j].e.id = a[j].i; + + a = null; + return o; + } + } |
