Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 031a825

Browse files
committed
fix for tabkey out of input thanks to @tomecko
1 parent bca3886 commit 031a825

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-datepicker",
3-
"version": "0.2.21-beta",
3+
"version": "0.2.22-beta",
44
"description": "A datepicker directive for angularjs.",
55
"authors": [
66
"Filippo Oretti <[email protected]",

dist/angular-datepicker.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-datepicker.sourcemap.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-datepicker",
3-
"version": "0.2.21-beta",
3+
"version": "0.2.22-beta",
44
"description": "A datepicker directive for angularjs.",
55
"homepage": "http://720kb.github.io/angular-datepicker",
66
"keywords": [

src/js/angular-datepicker.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,18 @@
714714
theCalendar = element[0].querySelector('._720kb-datepicker-calendar');
715715
}
716716
//some tricky dirty events to fire if click is outside of the calendar and show/hide calendar when needed
717-
thisInput.on('focus click', function onFocusAndClick() {
717+
thisInput.on('focus click focusin', function onFocusAndClick() {
718718

719719
isMouseOnInput = true;
720-
showCalendar();
720+
721+
if (!isMouseOn &&
722+
!isMouseOnInput && theCalendar) {
723+
724+
$scope.hideCalendar();
725+
} else {
726+
727+
showCalendar();
728+
}
721729
});
722730

723731
thisInput.on('focusout blur', function onBlurAndFocusOut() {

0 commit comments

Comments
 (0)