Merge pull request #784 from ZogStriP/fix-right-click-on-selection-deselects

FIX: right click on selection deselects
This commit is contained in:
Sam 2013-04-28 19:01:55 -07:00
commit c850dd9f88
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) { .on("mousedown.quote-button", function(e) {
view.set('isMouseDown', true); view.set('isMouseDown', true);
if ($(e.target).hasClass('quote-button') || $(e.target).hasClass('create')) return; 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) { .on('mouseup.quote-button', function(e) {
view.selectText(e.target, controller); view.selectText(e.target, controller);