Driving the re-apply from the observer callbacks caught the refocus case but fired on far more than that: ResizeObserver reports every reflow, so dragging the panel, a scrollbar appearing, or anything that changed the layout re-applied the stored depth and discarded whatever had just been expanded by hand. From the outside that is the pivot snapping to a different layout while clicking around. Going away is what discards the view; a reflow is not. So the callbacks now record the departure -- lost intersection, collapsed to zero size, or a hidden document -- and only a return after one of those restores anything. The flag clears once the depth is back, so one departure causes one restore. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| vendor | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.