Skip to content

Commit

Permalink
Fix sidenav issue on an iPhone (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
juujisai authored Jul 25, 2023
1 parent fbd0564 commit 69e6ec6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/js/navigation/sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,16 @@ class Sidenav {
}
}

_isiPhone() {
return /iPhone|iPod/i.test(navigator.userAgent);
}

_update(show) {
// workaround for iphone issues
if (show && this._isiPhone()) {
Manipulator.addClass(this._element, "ps--scrolling-y");
}

if (this.toggler) {
this._updateTogglerAria(show);
}
Expand Down

0 comments on commit 69e6ec6

Please sign in to comment.