1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 04:56:12 +02:00

enhance(frontend): disable horizontal swipe for timeline/notifications to improve ux

This commit is contained in:
syuilo
2025-03-29 15:00:29 +09:00
parent 33e76f9dfc
commit 1af4081090
10 changed files with 56 additions and 51 deletions

View File

@@ -93,7 +93,7 @@ export function onScrollBottom(el: HTMLElement, cb: () => unknown, tolerance = 1
return removeListener;
}
export function scroll(el: HTMLElement, options: ScrollToOptions | undefined) {
export function scrollInContainer(el: HTMLElement, options: ScrollToOptions | undefined) {
const container = getScrollContainer(el);
if (container == null) {
window.scroll(options);
@@ -108,7 +108,7 @@ export function scroll(el: HTMLElement, options: ScrollToOptions | undefined) {
* @param options Scroll options
*/
export function scrollToTop(el: HTMLElement, options: { behavior?: ScrollBehavior; } = {}) {
scroll(el, { top: 0, ...options });
scrollInContainer(el, { top: 0, ...options });
}
/**