summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorarai-a <arai_a@mac.com>2018-01-10 17:53:16 +0100
committerDylan William Hardison <dylan@hardison.net>2018-01-10 17:53:16 +0100
commit6f7bad0e4cca15a01d6abd347eb7ae3754907399 (patch)
tree907ff7ddb9bddae60c95f3b9bdc2bdf32de1a14c /js
parent0d65339b1a1a066a53aa93a98ed08afabe1dc672 (diff)
downloadbugzilla-6f7bad0e4cca15a01d6abd347eb7ae3754907399.tar.gz
bugzilla-6f7bad0e4cca15a01d6abd347eb7ae3754907399.tar.xz
Bug 1429449 - Do not handle non-primary click on dropdown menu
Diffstat (limited to 'js')
-rw-r--r--js/dropdown.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/dropdown.js b/js/dropdown.js
index 58aa4fee2..fd71d0b6e 100644
--- a/js/dropdown.js
+++ b/js/dropdown.js
@@ -9,6 +9,10 @@ $(function() {
'use strict';
$(window).click(function(e) {
+ // Do not handle non-primary click.
+ if (e.button != 0) {
+ return;
+ }
// clicking dropdown button opens or closes the dropdown content
if (!$(e.target).hasClass('dropdown-button')) {
$('.dropdown-button').each(function() {
@@ -100,6 +104,10 @@ $(function() {
var $button = $div.find('.dropdown-button');
var $content = $div.find('.dropdown-content');
$button.click(function(e) {
+ // Do not handle non-primary click.
+ if (e.button != 0) {
+ return;
+ }
toggleDropDown(e, $button, $content);
}).keydown(function(e) {
if (e.keyCode == 13) {