This commit is contained in:
John Firebaugh
2013-03-25 11:04:18 -07:00
parent a3d2411967
commit 8bbd828324

View File

@@ -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