about summary refs log tree commit diff
path: root/src/components/hooks/dates.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-11-28 16:55:05 +0000
committerGitHub <noreply@github.com>2024-11-28 16:55:05 +0000
commitd08ce0d473374c0720d018e8fc8ed550ed32544a (patch)
treed564b58ea931538d23897c7b2ce8b69ac54c8580 /src/components/hooks/dates.ts
parent0aee6390fa8faad22608bbc2b0b4352c2af0a2f9 (diff)
downloadvoidsky-d08ce0d473374c0720d018e8fc8ed550ed32544a.tar.zst
Fix stuck lightbox (#6816)
* Fix lightbox getting stuck by fixing rAF order

If you spam opening lightbox too fast, the effect that calls rAF will clean up and set up again midflight. Unfortunately, due to rAF order being unreliable, it may fire in reverse order, causing "open, open, close" instead of "open, close, open", so it would get stuck closed. This fixes the rAF order.

* Don't allow opening another lightbox while it's open
Diffstat (limited to 'src/components/hooks/dates.ts')
0 files changed, 0 insertions, 0 deletions