Skip to content

Commit

Permalink
make sure active element is not null (flatpickr#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlouie authored and chmln committed Jul 9, 2018
1 parent a9528e5 commit d43c167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ function FlatpickrInstance(
}

function focusOnDay(current: DayElement | undefined, offset: number) {
const dayFocused = isInView(document.activeElement);
const dayFocused = isInView(document.activeElement || document.body);
const startElem =
current !== undefined
? current
Expand Down

0 comments on commit d43c167

Please sign in to comment.