Remove keyboard shortcut from input's placeholder on mobile

This commit is contained in:
Adrien Maston
2026-01-20 15:43:39 +01:00
parent 3a685ca2b9
commit 8c5ce3487e
2 changed files with 18 additions and 1 deletions
@@ -0,0 +1,16 @@
import { Controller } from "@hotwired/stimulus"
import { isTouchDevice } from "helpers/platform_helpers"
export default class extends Controller {
static get shouldLoad() {
return isTouchDevice()
}
static values = { placeholder: String }
connect() {
if (this.hasPlaceholderValue) {
this.element.placeholder = this.placeholderValue
}
}
}