I have an AMP page with a form, it has an input type "file". When you select a photo the form is submitted. I use that to preview the image. It works fine in android and pc, but it fails in android if you choose to take a picture instead of select an image.
In my case, it appears when I click to upload in my android:
If I click file, it works fine. If I click Camera, nothing happens when the pic is took.
The code is simple:
<input type="file"
name="image"
id="image"
tabindex="0"
on="change:item-form.submit">
Is there a way to trigger "on=change" from Android camera? If not, is there a way to prevent that action for smartphones?
Use
input-debouncedorinput-throttled: Elements that fire input event same aschangeeventinput-debounced
Fired when the value of the element is changed. This is similar to the standard
changeevent, but it only fires when 300ms have passed after the value of theinputhas stopped changing.input-throttled
Fired when the value of the element is changed. This is similar to the standard
changeevent, but it is throttled to firing at most once every 100ms while the value of theinputis changing.For more information