FIX: right click on selection deselects

This commit is contained in:
Régis Hanol 2013-04-29 01:38:14 +02:00
parent 9e3b70c20e
commit a651270c09
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ Discourse.QuoteButtonView = Discourse.View.extend({
.on("mousedown.quote-button", function(e) {
view.set('isMouseDown', true);
if ($(e.target).hasClass('quote-button') || $(e.target).hasClass('create')) return;
controller.deselectText();
// deselects only when the user left-click
if (e.which === 1) controller.deselectText();
})
.on('mouseup.quote-button', function(e) {
view.selectText(e.target, controller);