mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-19 01:23:25 +00:00
Simplify
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user