mirror of https://github.com/docusealco/docuseal
parent
66862e93c8
commit
807e82b21e
@ -0,0 +1,15 @@
|
|||||||
|
export default class extends HTMLElement {
|
||||||
|
connectedCallback () {
|
||||||
|
if (!this.isMobile()) return
|
||||||
|
|
||||||
|
document.querySelectorAll('a[data-turbo-frame="modal"]').forEach((link) => {
|
||||||
|
link.dataset.turboFrame = '_top'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
isMobile () {
|
||||||
|
const isTouchWebkit = 'ontouchstart' in window && navigator.maxTouchPoints > 0 && /AppleWebKit|android/i.test(navigator.userAgent)
|
||||||
|
|
||||||
|
return isTouchWebkit || /iPhone|iPad|iPod/i.test(navigator.userAgent)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue