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/templates | |
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/templates')
-rw-r--r-- | askbot/templates/question.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/askbot/templates/question.html b/askbot/templates/question.html index 9a508a2f..a8aef0a7 100644 --- a/askbot/templates/question.html +++ b/askbot/templates/question.html @@ -43,6 +43,10 @@ return nodes; }; + var getTextContent = function(node) { + return node.innerText || node.textContent; + }; + var hasAttribute = function(node, attrName) { if (node.hasAttribute) { return node.hasAttribute(attrName); @@ -139,7 +143,7 @@ //todo: this is not reliable var answerBodyNodes = answerBody.childNodes; var answerElement = answerBodyNodes[answerBodyNodes.length - 1]; - if (trim(answerElement.textContent).length > askbot['data']['maxCommentLength']) { + if (trim(getTextContent(answerElement)).length > askbot['data']['maxCommentLength']) { repostAsQuestionComment.parentNode.removeChild(repostAsQuestionComment); repostAsPrevAnsComment.parentNode.removeChild(repostAsPrevAnsComment); } else if (parseInt(post_id) === data['oldestAnswerId']) { |