implement a safari hack for ime (#4186)
remove debug logs use a better hack implement a safari hack extract `isSafari` and `isFirefox` to a global variable
This commit is contained in:
parent
2c6c906934
commit
d051614342
5 changed files with 30 additions and 6 deletions
6
src/lib/browser.ts
Normal file
6
src/lib/browser.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
// https://stackoverflow.com/questions/7944460/detect-safari-browser
|
||||
export const isSafari = /^((?!chrome|android).)*safari/i.test(
|
||||
navigator.userAgent,
|
||||
)
|
||||
|
||||
export const isFirefox = /firefox|fxios/i.test(navigator.userAgent)
|
Loading…
Add table
Add a link
Reference in a new issue