Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend/scroll): no callback for disconnected elements #11714

Merged
merged 2 commits into from
Aug 13, 2023

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Aug 13, 2023

What

el.isConnectedチェックを追加

Why

Fixes #.... 忘れました。覚えている方は教えてください

タイムラインを下にスクロールしてノート画面に移動して再び戻ったら以前のスクロール位置を失う問題を修正

画面転換によってIntersectionObserverが発動し、それがonScrollTopをコール、executeQueue()がコールされる問題です

backed = entries[0].isIntersecting;

scrollRemove = (props.pagination.reversed ? onScrollBottom : onScrollTop)(contentEl, executeQueue, TOLERANCE);

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Aug 13, 2023
@codecov
Copy link

codecov bot commented Aug 13, 2023

Codecov Report

Merging #11714 (7148a7d) into develop (2896fc6) will increase coverage by 0.09%.
Report is 3 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #11714      +/-   ##
===========================================
+ Coverage    78.67%   78.76%   +0.09%     
===========================================
  Files          921      924       +3     
  Lines        97606    97857     +251     
  Branches      7711     7741      +30     
===========================================
+ Hits         76791    77077     +286     
+ Misses       20815    20780      -35     
Files Changed Coverage Δ
packages/frontend/src/scripts/scroll.ts 63.43% <100.00%> (+33.58%) ⬆️

... and 18 files with indirect coverage changes

@tamaina tamaina merged commit ab58b65 into develop Aug 13, 2023
18 checks passed
@tamaina tamaina deleted the no-scroll-timeline branch August 13, 2023 12:22
@tamaina
Copy link
Contributor

tamaina commented Aug 13, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants