FIX: Touch events conflicted on mobile safari with `{{action}}`s, preventing admin menu
option from working. Mobile Safari works with click so this seems to fix it.
This commit is contained in:
parent
06e83c9e6a
commit
526f2af69a
|
@ -9,12 +9,12 @@
|
||||||
Discourse.TopicAdminMenuView = Discourse.View.extend({
|
Discourse.TopicAdminMenuView = Discourse.View.extend({
|
||||||
|
|
||||||
willDestroyElement: function() {
|
willDestroyElement: function() {
|
||||||
$('html').off('mouseup.discourse-topic-admin-menu touchend.discourse-topic-admin-menu');
|
$('html').off('mouseup.discourse-topic-admin-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement: function() {
|
didInsertElement: function() {
|
||||||
var topicAdminMenuView = this;
|
var topicAdminMenuView = this;
|
||||||
return $('html').on('mouseup.discourse-topic-admin-menu touchend.discourse-topic-admin-menu', function(e) {
|
$('html').on('mouseup.discourse-topic-admin-menu', function(e) {
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
if ($target.is('button') || topicAdminMenuView.$().has($target).length === 0) {
|
if ($target.is('button') || topicAdminMenuView.$().has($target).length === 0) {
|
||||||
topicAdminMenuView.get('controller').hide();
|
topicAdminMenuView.get('controller').hide();
|
||||||
|
|
Loading…
Reference in New Issue