forked from wallabag/wallabag
Fix Firefox mobile unneeded resize
Before that, on Firefox Mobile, when you were moving to the top or to the bottom of the page, you were stopped before to go to the opposite side.
This commit is contained in:
@ -19,14 +19,16 @@ function savePercent(id, percent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function retrievePercent(id) {
|
||||
function retrievePercent(id, resized) {
|
||||
if (!supportsLocalStorage()) { return false; }
|
||||
|
||||
const bheight = $(document).height();
|
||||
const percent = localStorage[`wallabag.article.${id}.percent`];
|
||||
const scroll = bheight * percent;
|
||||
|
||||
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
||||
if (!resized) {
|
||||
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user