fix: enable focus-visible in Firefox 90 (#2075)
This commit is contained in:
parent
d84f4604ad
commit
d30f7f4b1a
|
@ -1,8 +1,8 @@
|
|||
import { thunk } from './thunk.js'
|
||||
import { supportsSelector } from './supportsSelector.js'
|
||||
import { isFirefox } from './userAgent/isFirefox.js'
|
||||
import { isFirefoxPre90 } from './userAgent/isFirefoxPre90.js'
|
||||
|
||||
// Disabling for now in Firefox due to bugs:
|
||||
// Disabling in Firefox <90 due to bugs:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1699154
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1711057
|
||||
export const supportsFocusVisible = thunk(() => (!isFirefox() && supportsSelector(':focus-visible')))
|
||||
export const supportsFocusVisible = thunk(() => (!isFirefoxPre90() && supportsSelector(':focus-visible')))
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
import { thunk } from '../thunk.js'
|
||||
|
||||
export const isFirefox = thunk(() => {
|
||||
return process.browser && typeof InstallTrigger !== 'undefined' // https://stackoverflow.com/a/9851769/680742
|
||||
})
|
|
@ -0,0 +1,9 @@
|
|||
import { thunk } from '../thunk.js'
|
||||
|
||||
export const isFirefoxPre90 = thunk(() => {
|
||||
return process.browser &&
|
||||
// https://stackoverflow.com/a/9851769/680742
|
||||
typeof InstallTrigger !== 'undefined' &&
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at#browser_compatibility
|
||||
!Array.prototype.at
|
||||
})
|
Loading…
Reference in New Issue