Don't load the navigable list controller on mobile

This commit is contained in:
Adrien Maston
2025-12-19 12:16:04 +01:00
parent 586cc79ebb
commit b49aa9cbf1
3 changed files with 23 additions and 1 deletions
@@ -1,10 +1,11 @@
import { Controller } from "@hotwired/stimulus"
import { nextEventNamed } from "helpers/timing_helpers"
import { isTouchDevice } from "helpers/platform_helpers"
export default class extends Controller {
// Only load for touch devices
static get shouldLoad() {
return "ontouchstart" in window && navigator.maxTouchPoints > 0
return isTouchDevice()
}
// Use a fake input to trigger the soft keyboard on actions that load async content