diff --git a/static/js/utils/massInput.js b/static/js/utils/massInput.js index 1b5cf10ac..85e7049cb 100644 --- a/static/js/utils/massInput.js +++ b/static/js/utils/massInput.js @@ -82,9 +82,16 @@ } return function(event) { + var activeElement; + // check if event occured from either a mass input add/delete button or // from inside one of massinput's inputs (i.e. they are focused/active) - var activeElement = element.querySelector(':focus, :active'); + if (event.type === 'click') { + activeElement = event.target; + } else { + activeElement = element.querySelector(':focus, :active'); + } + if (!activeElement) { return false; }