mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
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({
|
||||
|
||||
willDestroyElement: function() {
|
||||
$('html').off('mouseup.discourse-topic-admin-menu touchend.discourse-topic-admin-menu');
|
||||
$('html').off('mouseup.discourse-topic-admin-menu');
|
||||
},
|
||||
|
||||
didInsertElement: function() {
|
||||
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);
|
||||
if ($target.is('button') || topicAdminMenuView.$().has($target).length === 0) {
|
||||
topicAdminMenuView.get('controller').hide();
|
||||
|
Loading…
Reference in New Issue
Block a user