mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-13 09:28:50 +01:00
Double make sure header change doesn't block scrolling
This commit is contained in:
parent
6919975c6d
commit
a8331375ba
2 changed files with 15 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
align-self: stretch;
|
||||
}
|
||||
.status-deck header h1 .deck-back {
|
||||
margin-left: -16px;
|
||||
|
|
|
@ -735,7 +735,13 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
<>
|
||||
<InView
|
||||
threshold={0.1}
|
||||
onChange={setHeroInView}
|
||||
onChange={(inView) => {
|
||||
queueMicrotask(() => {
|
||||
requestAnimationFrame(() => {
|
||||
setHeroInView(inView);
|
||||
});
|
||||
});
|
||||
}}
|
||||
class="status-focus"
|
||||
tabIndex={0}
|
||||
>
|
||||
|
@ -813,7 +819,13 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
<InView
|
||||
skip={i !== 0 || !ancestor}
|
||||
threshold={0.5}
|
||||
onChange={setReachTopPost}
|
||||
onChange={(inView) => {
|
||||
queueMicrotask(() => {
|
||||
requestAnimationFrame(() => {
|
||||
setReachTopPost(inView);
|
||||
});
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Status
|
||||
statusID={statusID}
|
||||
|
|
Loading…
Reference in a new issue