diff options
-rw-r--r-- | js/dropdown.js | 8 |
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) { |