Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(calendar): fix voiceover scrolling already-scrolled calendar.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn committed Aug 13, 2015
1 parent c3bf840 commit db3d06e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,14 @@
// Keyboard interaction.
//this.calendarElement.addEventListener('keydown', angular.bind(this, this.handleKeyEvent));
this.$element.on('keydown', angular.bind(this, this.handleKeyEvent));

var self = this;
this.calendarScroller.addEventListener('scroll', function() {
if (self.calendarScroller.scrollTop == 0 &&
!self.dateUtil.isSameMonthAndYear(firstRenderableDate, self.displayDate)) {
self.changeDisplayDate(self.displayDate);
}
});
};

/*** User input handling ***/
Expand Down

0 comments on commit db3d06e

Please sign in to comment.