From 273e5c00bbcb6242e78e123d101c6c1980ce826e Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 11 Jun 2015 11:21:44 +0800 Subject: [PATCH] FIX: Double click on IE11 not highlighting word. --- app/assets/javascripts/discourse/views/quote-button.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/views/quote-button.js.es6 b/app/assets/javascripts/discourse/views/quote-button.js.es6 index dad4b4d79..e8e1dac4a 100644 --- a/app/assets/javascripts/discourse/views/quote-button.js.es6 +++ b/app/assets/javascripts/discourse/views/quote-button.js.es6 @@ -50,7 +50,9 @@ export default Discourse.View.extend({ // deselects only when the user left click // (allows anyone to `extend` their selection using shift+click) - if (e.which === 1 && !e.shiftKey) controller.deselectText(); + if (!window.getSelection().isCollapsed && + e.which === 1 && + !e.shiftKey) controller.deselectText(); }) .on('mouseup.quote-button', function(e) { view.selectText(e.target, controller);