daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

docs: Navigation does not work due to call to navigator.sendBeacon()

Open PascalKoe opened this issue 1 year ago โ€ข 1 comments

On which page do you see this issue?

https://daisyui.com

Describe the issue

When pressing a button/link to navigate to another page on https://daisyui.com, the URL in the browsers navigation bar changes, but the new page is not displayed. In the console of the browser, the following error is shown:

Uncaught (in promise) TypeError: navigator.sendBeacon is not a function
    Immutable 7
    async* https://daisyui.com/:89
    promise callback* https://daisyui.com/:88
2.B1NS795p.js:4:13786
    Y Immutable
    InterpretGeneratorResume self-hosted:1455
    AsyncFunctionNext self-hosted:852
    (Async: async)
    Ze Immutable
    InterpretGeneratorResume self-hosted:1455
    AsyncFunctionNext self-hosted:852
    Immutable 2
    InterpretGeneratorResume self-hosted:1455
    AsyncFunctionNext self-hosted:852
    (Async: async)
    <anonymous> https://daisyui.com/:89
    (Async: promise callback)
    <anonymous> https://daisyui.com/:88

The problem can be 'fixed' by defining the function issuing the following command in the browsers console: navigator.sendBeacon = () => {}.

The browser, the configuration, and the extensions are company managed. I do not have any real insights on what anti tracking measures they have in place.

What browsers are you seeing the problem on?

Firefox

PascalKoe avatar Aug 08 '24 09:08 PascalKoe

Thank you @PascalKoe for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

github-actions[bot] avatar Aug 08 '24 09:08 github-actions[bot]

Just checked with the released v5 docs and unfortunately the issue has not been resolved.

I've created an issue in the upstream library https://github.com/jahilldev/minimal-analytics/issues/56

PascalKoe avatar Mar 03 '25 13:03 PascalKoe

Hey @PascalKoe
I couldn't replicate the issue in the new site so I assumed it's already fixed with a dependency updateโ€ฆ

It seems working correctly here ๐Ÿค”

https://github.com/user-attachments/assets/b4f71591-18d6-4dd2-9842-035ab30870ee

Thanks for opening the issue at minimal-analytics ๐Ÿ‘

saadeghi avatar Mar 03 '25 14:03 saadeghi

Yep would also expect to not reproduce. The only option would be to join my company and get one of the heavily configured machines ๐Ÿ˜„. At least it is consistent across our companies machines, on my personal machine or when using a custom browser installation on the company device, it works without issues.

As the issue is with minimal-analytics I will try to remember to ping here again as soon as it is fixed. Thanks!

PascalKoe avatar Mar 03 '25 14:03 PascalKoe