From c288ba0a172d079f55f8e19e504b46a5e0878878 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 27 May 2016 14:55:02 -0500 Subject: [PATCH] fix replying on IE11 - see https://github.com/NodeBB/NodeBB/commit/c50f228accc3485fcee74e875b9316f8e65e9261#commitcomment-17651064 (#4699) --- public/src/client/topic/postTools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index fa2a72e617..0195c00417 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -232,7 +232,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator var selection = window.getSelection ? window.getSelection() : document.selection.createRange(); var content = button.parents('[component="post"]').find('[component="post/content"]').get(0); - if (content && selection.containsNode(content, true)) { + if (selection && selection.containsNode && content && selection.containsNode(content, true)) { var bounds = document.createRange(); bounds.selectNodeContents(content); var range = selection.getRangeAt(0).cloneRange();