mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
25.18k stars 1.8k forks source link

EyeDropper doesn't work in Opera browser #6306

Closed viktorkasap closed 2 hours ago

viktorkasap commented 4 weeks ago

Dependencies check up

What version of @mantine/* packages do you have in package.json?

7.10.0

What package has an issue?

@mantine/hooks

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Other, I will specify in the bug description

Describe the bug

Found out that EyeDropper hook does not work correctly in Opera browser. Despite the fact that there is EyeDropper key in window object and under the hood Opera uses Chromium. There will be no errors in the console, because there is a key in window and there are methods.

Opera-05-29-2024-15-36-04

Opera-05-29-2024-15-46-18

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

As a solution I suggest not to show this dropper in Opera browser by adding a check:

function isOpera() {
    return navigator.userAgent.includes('OPR');
}

Self-service

viktorkasap commented 3 weeks ago

https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper

Opera-06-04-2024-08-48-13