mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 12:24:55 +00:00
FIX: Opening options menu did not dismiss emoji menu
This commit is contained in:
parent
0cad5b2125
commit
416c79daa5
@ -178,13 +178,17 @@ export default Ember.Component.extend({
|
|||||||
_bindModalClick() {
|
_bindModalClick() {
|
||||||
this.$modal.on("click", () => this.set("active", false));
|
this.$modal.on("click", () => this.set("active", false));
|
||||||
|
|
||||||
this.$(document).on("click.emoji-picker", (event) => {
|
$('html').on("mouseup.emoji-picker", event => {
|
||||||
const onPicker = $(event.target).parents(".emoji-picker").length === 1;
|
let $target = $(event.target);
|
||||||
const onGrippie = event.target.className.indexOf("grippie") > -1;
|
if ($target.closest(".emoji-picker").length ||
|
||||||
if(!onPicker && !onGrippie) {
|
$target.closest('.emoji.btn').length ||
|
||||||
|
$target.hasClass('grippie')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close the popup if clicked outside
|
||||||
this.set("active", false);
|
this.set("active", false);
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -194,7 +198,7 @@ export default Ember.Component.extend({
|
|||||||
this.$(window).off("resize");
|
this.$(window).off("resize");
|
||||||
this.$modal.off("click");
|
this.$modal.off("click");
|
||||||
$("#reply-control").off("div-resizing");
|
$("#reply-control").off("div-resizing");
|
||||||
this.$(document).off("click.emoji-picker");
|
$('html').off("mouseup.emoji-picker");
|
||||||
},
|
},
|
||||||
|
|
||||||
_filterEmojisList() {
|
_filterEmojisList() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user