Merge pull request #8040 from wallabag/remove-jquery-animations

Remove jQuery animations
This commit is contained in:
Yassine Guedidi 2025-03-01 17:42:23 +01:00 committed by GitHub
commit ee534a2415
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

@ -298,13 +298,13 @@ $(document).ready(() => {
initPreviewText();
const toggleNav = (toShow, toFocus) => {
$('.nav-panel-actions').hide(100);
$(toShow).show(100);
$('.nav-panel-actions').hide();
$(toShow).show();
$(toFocus).focus();
};
$('#nav-btn-add-tag').on('click', () => {
$('.nav-panel-add-tag').toggle(100);
$('.nav-panel-add-tag').toggle();
$('.nav-panel-menu').addClass('hidden');
if (window.innerWidth < mobileMaxWidth) {
$('.sidenav').sidenav('close');
@ -353,8 +353,8 @@ $(document).ready(() => {
});
$('.close').on('click', (e) => {
$(e.target).parent('.nav-panel-item').hide(100);
$('.nav-panel-actions').show(100);
$(e.target).parent('.nav-panel-item').hide();
$('.nav-panel-actions').show();
return false;
});

View file

@ -22,7 +22,10 @@ function retrievePercent(id, resized) {
const scroll = bheight * percent;
if (!resized) {
$('html,body').animate({ scrollTop: scroll }, 'fast');
window.scrollTo({
top: scroll,
behavior: 'smooth',
});
}
return true;