review fixes

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:18 +03:00
1 parent d071e8c429
commit e11f4bddbe
40 files changed
+299 -192

No files matched your search

+7 -3
View File
@@ -1,13 +1,17 @@
export default class extends HTMLElement {
connectedCallback () {
this.addEventListener('pointerdown', this.onPointerdown)
}
onPointerdown = (event) => {
if (this.dataset.disabled === 'true') return
if (/Hotwire Native/.test(navigator.userAgent)) return
if (!this.isMobile()) return
if (window.innerWidth >= 768) return
this.querySelectorAll('a[data-turbo-frame]').forEach((link) => {
link.dataset.turboFrame = '_top'
})
const link = event.target.closest('a[data-turbo-frame]')
if (link) link.dataset.turboFrame = '_top'
}
isMobile () {