FIX: Do not reset original scroll position in iOS to zero

This avoids scrolling to the top of a post when toggling focus to the composer textarea
This commit is contained in:
Penar Musaraj 2019-10-08 11:59:53 -04:00
parent 4fdad12998
commit b20b6c52e1
1 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,9 @@ function positioningWorkaround($fixedElement) {
.find(".select-kit > button.is-focused")
.removeClass("is-focused");
originalScrollTop = $(window).scrollTop();
if ($(window).scrollTop() > 0) {
originalScrollTop = $(window).scrollTop();
}
setTimeout(function() {
if (iOSWithVisualViewport()) {