qwik
qwik copied to clipboard
[🐞] `useVisibleTask$` should not execute when newly rendered elements are not yet visible after a `<Link>` navigate.
Which component is affected?
Qwik Runtime
Describe the bug
[🐞] When navigating through <Link> useVisibleTask$ executes even if the newly rendered elements are not yet visible to the browser.
Reproduction
https://stackblitz.com/edit/qwik-starter-9fgsq9?file=src/routes/new/index.tsx
Steps to reproduce
https://stackblitz.com/edit/qwik-starter-9fgsq9?file=src/routes/new/index.tsx
on nav or header, click "NEW" then click "HOME", notice the several lines of FROM: INDEX, this means the useVisibleTask$ is executed when we go back to "HOME" even though those elements are not yet visible.
System Info
System:
OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-11320H @ 3.20GHz
Memory: 3.24 GB / 15.41 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Browsers:
Brave Browser: 111.1.49.132
Chrome: 111.0.5563.146
Firefox: 111.0.1
Additional Information
No response
this should be different or correct in v2