diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-06 21:56:21 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-06 21:56:21 -0400 |
commit | 9da5a59401ba850ea0fdb4a6c116dbdb0a183a5c (patch) | |
tree | 011053dee731e86252d1070154d8fd4c3850a191 /askbot/media | |
parent | a26bca9638a5fe77f5e833738386e6805a177744 (diff) | |
download | askbot-9da5a59401ba850ea0fdb4a6c116dbdb0a183a5c.tar.gz askbot-9da5a59401ba850ea0fdb4a6c116dbdb0a183a5c.tar.bz2 askbot-9da5a59401ba850ea0fdb4a6c116dbdb0a183a5c.zip |
fixed IE8 issues in the editor and on the question page
Diffstat (limited to 'askbot/media')
-rw-r--r-- | askbot/media/js/wmd/wmd.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/askbot/media/js/wmd/wmd.js b/askbot/media/js/wmd/wmd.js index c3c85b21..35a571e5 100644 --- a/askbot/media/js/wmd/wmd.js +++ b/askbot/media/js/wmd/wmd.js @@ -452,8 +452,7 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ if (input.type == 'text' && input.selectionStart !== undefined) { input.selectionStart = 0; input.selectionEnd = defTextLen; - } - else if (input.createTextRange) { + } else if (input.createTextRange) { var range = input.createTextRange(); range.collapse(false); range.moveStart("character", -defTextLen); @@ -494,30 +493,26 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ var innerWidth, innerHeight; // It's not very clear which blocks work with which browsers. - if(self.innerHeight && self.scrollMaxY){ + if (self.innerHeight && self.scrollMaxY) { scrollWidth = doc.body.scrollWidth; scrollHeight = self.innerHeight + self.scrollMaxY; - } - else if(doc.body.scrollHeight > doc.body.offsetHeight){ + } else if (doc.body.scrollHeight > doc.body.offsetHeight){ scrollWidth = doc.body.scrollWidth; scrollHeight = doc.body.scrollHeight; - } - else{ + } else { scrollWidth = doc.body.offsetWidth; scrollHeight = doc.body.offsetHeight; } - if(self.innerHeight){ + if (self.innerHeight) { // Non-IE browser innerWidth = self.innerWidth; innerHeight = self.innerHeight; - } - else if(doc.documentElement && doc.documentElement.clientHeight){ + } else if (doc.documentElement && doc.documentElement.clientHeight){ // Some versions of IE (IE 6 w/ a DOCTYPE declaration) innerWidth = doc.documentElement.clientWidth; innerHeight = doc.documentElement.clientHeight; - } - else if(doc.body){ + } else if(doc.body) { // Other versions of IE innerWidth = doc.body.clientWidth; innerHeight = doc.body.clientHeight; @@ -1950,7 +1945,7 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ var result = 0; - if (innerHeight) { + if (window.innerHeight) { result = pageYOffset; } else |