feat: show emoji picker on non-touch devices
This commit is contained in:
parent
94e2a446e8
commit
4785efd43c
2 changed files with 18 additions and 1 deletions
|
|
@ -24,6 +24,11 @@ export function isTorBrowser() {
|
|||
return /torbrowser/i.test(ua)
|
||||
}
|
||||
|
||||
export function isTouchDevice() {
|
||||
if (typeof window === 'undefined' || !window.navigator) return false
|
||||
return 'ontouchstart' in window || navigator.maxTouchPoints > 0
|
||||
}
|
||||
|
||||
export function isInViewport(el: HTMLElement) {
|
||||
const rect = el.getBoundingClientRect()
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue