fix a bug where clicking on a separator in an input group would call focusInput of an element without such a method

This commit is contained in:
rlx 2011-11-10 10:44:35 +00:00
commit 3130de08c5
2 changed files with 9 additions and 3 deletions

View file

@ -83,7 +83,12 @@ Ox.InputGroup = function(options, self) {
function click(event) {
if ($(event.target).hasClass('OxSeparator')) {
self.options.inputs[0].focusInput();
Ox.forEach(self.options.inputs, function($input) {
if ($input.focusInput) {
$input.focusInput();
return false;
}
});
}
}