mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 17:23:08 +02:00
?
This commit is contained in:
parent
130ece74f9
commit
68d647d6b8
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ watch([$$(weakBacked), $$(contentEl)], () => {
|
||||||
function adjustScroll(fn: () => void): Promise<void> {
|
function adjustScroll(fn: () => void): Promise<void> {
|
||||||
const oldHeight = scrollableElement ? scrollableElement.scrollHeight : getBodyScrollHeight();
|
const oldHeight = scrollableElement ? scrollableElement.scrollHeight : getBodyScrollHeight();
|
||||||
const oldScroll = scrollableElement ? scrollableElement.scrollTop : window.scrollY;
|
const oldScroll = scrollableElement ? scrollableElement.scrollTop : window.scrollY;
|
||||||
|
// スクロールをやめさせる
|
||||||
|
scroll(scrollableElement, { top: oldScroll, behavior: 'instant' });
|
||||||
|
|
||||||
fn();
|
fn();
|
||||||
return nextTick(() => {
|
return nextTick(() => {
|
||||||
|
|
Loading…
Reference in a new issue