Skip to content

Commit

Permalink
fix: fixed transition between mobile mode on and off, fixes t1m0n#470
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0n committed Jan 24, 2022
1 parent e08154c commit 46ce7d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,13 @@ export default class Datepicker {
this._addMobileAttributes();
} else if (prevOpts.isMobile && !isMobile) {
this._removeMobileAttributes();

if (this.visible) {
$datepickerOverlay.classList.remove('-active-');
if (typeof this.opts.position !== 'function') {
this.setPosition();
}
}
}

if (!shouldUpdateDOM) return;
Expand Down

0 comments on commit 46ce7d5

Please sign in to comment.