Do not close message compose box on drag.

On the drag to resize emoji box action, do not close the message
compose box.
This commit is contained in:
Brock Whittaker
2016-10-14 22:21:30 -07:00
committed by Tim Abbott
parent 87c62a6937
commit 2663215625

View File

@@ -424,7 +424,7 @@ $(function () {
// MAIN CLICK HANDLER
$(document).on('click', function (e) {
if (e.button !== 0) {
if (e.button !== 0 || $(e.target).is(".drag")) {
// Firefox emits right click events on the document, but not on
// the child nodes, so the #compose stopPropagation doesn't get a
// chance to capture right clicks.
@@ -438,7 +438,7 @@ $(function () {
// Unfocus our compose area if we click out of it. Don't let exits out
// of modals or selecting text (for copy+paste) trigger cancelling.
if (compose.composing() && !$(e.target).is("a, .drag") &&
if (compose.composing() && !$(e.target).is("a") &&
($(e.target).closest(".modal").length === 0) &&
window.getSelection().toString() === "" &&
($(e.target).closest('#emoji_map').length === 0)) {