mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 18:29:54 +08:00
do not deselect text when clicking on the reply button below the post
This commit is contained in:
parent
ce2af5c6d1
commit
c77a20eea5
|
@ -46,7 +46,8 @@ Discourse.QuoteButtonView = Discourse.View.extend({
|
||||||
$(document)
|
$(document)
|
||||||
.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;
|
// we don't want to deselect when we click on the quote button or the reply button
|
||||||
|
if ($(e.target).hasClass('quote-button') || $(e.target).closest('.create').length > 0) return;
|
||||||
// deselects only when the user left click
|
// deselects only when the user left click
|
||||||
// (allows anyone to `extend` their selection using shift+click)
|
// (allows anyone to `extend` their selection using shift+click)
|
||||||
if (e.which === 1 && !e.shiftKey) controller.deselectText();
|
if (e.which === 1 && !e.shiftKey) controller.deselectText();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user