Add a touchend event to the admin menu. Hopefully helps IE11 Touch.
This commit is contained in:
parent
be234ce9b9
commit
bdca804796
|
@ -9,16 +9,15 @@
|
||||||
Discourse.TopicAdminMenuView = Discourse.View.extend({
|
Discourse.TopicAdminMenuView = Discourse.View.extend({
|
||||||
|
|
||||||
willDestroyElement: function() {
|
willDestroyElement: function() {
|
||||||
$('html').off('mouseup.discourse-topic-admin-menu');
|
$('html').off('mouseup.discourse-topic-admin-menu touchend.discourse-topic-admin-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement: function() {
|
didInsertElement: function() {
|
||||||
var _this = this;
|
var topicAdminMenuView = this;
|
||||||
return $('html').on('mouseup.discourse-topic-admin-menu', function(e) {
|
return $('html').on('mouseup.discourse-topic-admin-menu touchend.discourse-topic-admin-menu', function(e) {
|
||||||
var $target;
|
var $target = $(e.target);
|
||||||
$target = $(e.target);
|
if ($target.is('button') || topicAdminMenuView.$().has($target).length === 0) {
|
||||||
if ($target.is('button') || _this.$().has($target).length === 0) {
|
topicAdminMenuView.get('controller').hide();
|
||||||
return _this.get('controller').hide();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue