mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
commit
e8e0f4c8be
@ -146,9 +146,9 @@ export default class WindowWrapper extends Wrapper {
|
||||
${scrolling} = true;
|
||||
clearTimeout(${scrolling_timeout});
|
||||
window.scrollTo(${
|
||||
bindings.scrollX ? `current["${bindings.scrollX}"]` : `window.pageXOffset`
|
||||
bindings.scrollX ? `ctx.${bindings.scrollX}` : `window.pageXOffset`
|
||||
}, ${
|
||||
bindings.scrollY ? `current["${bindings.scrollY}"]` : `window.pageYOffset`
|
||||
bindings.scrollY ? `ctx.${bindings.scrollY}` : `window.pageYOffset`
|
||||
});
|
||||
${scrolling_timeout} = setTimeout(${clear_scrolling}, 100);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ function create_fragment($$, ctx) {
|
||||
if (changed.y && !scrolling) {
|
||||
scrolling = true;
|
||||
clearTimeout(scrolling_timeout);
|
||||
window.scrollTo(window.pageXOffset, current["y"]);
|
||||
window.scrollTo(window.pageXOffset, ctx.y);
|
||||
scrolling_timeout = setTimeout(clear_scrolling, 100);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user