FIX: Double click on IE11 not highlighting word.

This commit is contained in:
Guo Xiang Tan 2015-06-11 11:21:44 +08:00
parent a52d31e25e
commit 273e5c00bb
1 changed files with 3 additions and 1 deletions

View File

@ -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);