diff --git a/js/lib/d3.combobox.js b/js/lib/d3.combobox.js index 44686cdfd..2f79a0848 100644 --- a/js/lib/d3.combobox.js +++ b/js/lib/d3.combobox.js @@ -20,8 +20,10 @@ d3.combobox = function() { selection.append('div', input) .attr('class', 'combobox-carat') - .on('mousedown', stop) .on('mousedown', function() { + // prevent the form element from blurring. it blurs + // on mousedown + d3.event.stopPropagation(); d3.event.preventDefault(); mousedown(); }); @@ -35,13 +37,6 @@ d3.combobox = function() { }); } - function stop() { - // prevent the form element from blurring. it blurs - // on mousedown - d3.event.stopPropagation(); - d3.event.preventDefault(); - } - function blur() { // hide the combobox whenever the input element // loses focus