fix: disable :focus-visible on Firefox (#2003)
* fix: disable :focus-visible on Firefox * fix: use unambiguous closure
This commit is contained in:
parent
40cb793e81
commit
fd321720f2
|
@ -1,4 +1,7 @@
|
|||
import { thunk } from './thunk'
|
||||
import { supportsSelector } from './supportsSelector'
|
||||
import { isFirefox } from './userAgent/isFirefox'
|
||||
|
||||
export const supportsFocusVisible = thunk(() => supportsSelector(':focus-visible'))
|
||||
// TODO: remove the Firefox check once this bug is fixed
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1699154
|
||||
export const supportsFocusVisible = thunk(() => (!isFirefox() && supportsSelector(':focus-visible')))
|
||||
|
|
3
src/routes/_utils/userAgent/isFirefox.js
Normal file
3
src/routes/_utils/userAgent/isFirefox.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
export function isFirefox () {
|
||||
return typeof InstallTrigger !== 'undefined' // https://stackoverflow.com/a/9851769/680742
|
||||
}
|
Loading…
Reference in a new issue