aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/app
diff options
context:
space:
mode:
authorSudara <sudara@alonetone.com>2019-06-06 22:06:14 +0200
committerSudara <sudara@alonetone.com>2019-06-13 19:59:17 +0200
commitab4ed8c78681e0bda514bf6343d54914841a0e72 (patch)
treefd8cf381494ffdc2f1ed472ef416656c3a710313 /actionview/app
parentcb9c1da6952628801cfc7323ca5b8193bda5b294 (diff)
downloadrails-ab4ed8c78681e0bda514bf6343d54914841a0e72.tar.gz
rails-ab4ed8c78681e0bda514bf6343d54914841a0e72.tar.bz2
rails-ab4ed8c78681e0bda514bf6343d54914841a0e72.zip
Ensure non-mouse/programmatic clicks work with data-remote
Diffstat (limited to 'actionview/app')
-rw-r--r--actionview/app/assets/javascripts/rails-ujs/features/remote.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee b/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee
index a5b61220bb..d1aeef56c7 100644
--- a/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee
+++ b/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee
@@ -88,6 +88,6 @@ Rails.preventInsignificantClick = (e) ->
data = link.getAttribute('data-params')
metaClick = e.metaKey or e.ctrlKey
insignificantMetaClick = metaClick and method is 'GET' and not data
- primaryMouseKey = e.button is 0
- e.stopImmediatePropagation() if not primaryMouseKey or insignificantMetaClick
+ nonPrimaryMouseClick = e.button? and e.button isnt 0
+ e.stopImmediatePropagation() if nonPrimaryMouseClick or insignificantMetaClick