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

[🐞] V2 - useOnDocument is not executed #7230

Open
devcaeg opened this issue Jan 6, 2025 · 2 comments
Open

[🐞] V2 - useOnDocument is not executed #7230

devcaeg opened this issue Jan 6, 2025 · 2 comments
Assignees
Labels
STATUS-2: team is working on this Scheduled for work by the core team TYPE: bug Something isn't working VERSION: upcoming major

Comments

@devcaeg
Copy link

devcaeg commented Jan 6, 2025

Which component is affected?

Qwik Runtime

Describe the bug

In the example I have a provider that contains a useOnDocument('load') and this provider is in the main layout, but the useOnDocument is never executed.

But if the useOnDocument('load') is placed in an index of a page, it is executed.

Reproduction

https://stackblitz.com/edit/github-6f6maw-tnantexa?file=src%2Fproviders%2Fbreakpoint.tsx

Steps to reproduce

Enter the playground and you will see that the console never executes the load message.

You can also check that when the useOnDocument(‘load’) is not executed, the pixel information is not displayed.

System Info

npmPackages:
    @qwik.dev/core: 2.0.0-alpha.4
    @qwik.dev/router: 2.0.0-alpha.4
    typescript: 5.7.2
    undici: 7.0.0 
    vite: 6.0.7

Additional Information

No response

@devcaeg devcaeg added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Jan 6, 2025
@gioboa
Copy link
Member

gioboa commented Jan 6, 2025

Thanks @devcaeg for your feedback

@gioboa gioboa added the STATUS-2: team is working on this Scheduled for work by the core team label Jan 6, 2025
@gioboa gioboa removed the STATUS-1: needs triage New issue which needs to be triaged label Jan 6, 2025
@JerryWu1234 JerryWu1234 self-assigned this Jan 7, 2025
@devcaeg
Copy link
Author

devcaeg commented Jan 7, 2025

I updated the reproduction because I realized that the error is not only with useOnDocument but also happens with useVisibleTask$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-2: team is working on this Scheduled for work by the core team TYPE: bug Something isn't working VERSION: upcoming major
Projects
Status: Backlog
Development

No branches or pull requests

4 participants