From 395e71feee34b5049cfa5cba657647dbeec9ae3a Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 25 Mar 2016 18:17:19 -0500 Subject: [PATCH] fix topic reply button --- 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 37f5e5d9cf..d1961a29a6 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -201,7 +201,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 (selection.containsNode(content, true)) { + if (content && selection.containsNode(content, true)) { var bounds = document.createRange(); bounds.selectNodeContents(content); var range = selection.getRangeAt(0).cloneRange();