Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit d474824

Browse files
DanWahlinpkozlowski-opensource
authored andcommittedAug 5, 2013
fix(datepicker): correctly manage focus without jQuery present
The element.focus() will throw an error since the object needs to be unwrapped first. Should be: element[0].focus() at a minimum to unwrap the jqlite object since it doesn't expose focus(). Closes #758
1 parent f6aa26b commit d474824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/datepicker/datepicker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
391391
updatePosition();
392392
$document.bind('click', documentClickBind);
393393
element.unbind('focus', elementFocusBind);
394-
element.focus();
394+
element[0].focus();
395395
} else {
396396
$document.unbind('click', documentClickBind);
397397
element.bind('focus', elementFocusBind);
@@ -427,4 +427,4 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
427427
});
428428
}
429429
};
430-
}]);
430+
}]);

0 commit comments

Comments
 (0)