Phenomenon
The inputmode attribute, which should control the type of virtual keyboard shown on mobile devices, does not work on contenteditable regions in iOS Safari. The keyboard type cannot be controlled.
Reproduction example
- Create a contenteditable div with
inputmode="numeric". - Open the page on iOS Safari.
- Focus the contenteditable.
- Observe the type of virtual keyboard that appears.
Observed behavior
- In iOS Safari, the
inputmodeattribute is ignored on contenteditable. - The default keyboard always appears.
- Numeric, email, or URL keyboards cannot be triggered.
Expected behavior
- The
inputmodeattribute should control the virtual keyboard type. - Numeric, email, URL, and other keyboard types should be available.
- Behavior should match standard input elements.