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

View file

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