Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
The ime-mode
CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete.
/* Keyword values */ ime-mode: auto; ime-mode: normal; ime-mode: active; ime-mode: inactive; ime-mode: disabled; /* Global values */ ime-mode: inherit; ime-mode: initial; ime-mode: unset;
The ime-mode
property is only partially and inconsistently implemented in browsers. It was introduced by Microsoft with Internet Explorer 5 as a proprietary extension: -ms-ime-mode Attribute | imeMode Property.
Note: In general, it's not appropriate for a public web site to change the IME mode. This property should only be used for private web applications or to undo the property if it was previously set by legacy code.
Initial value | auto |
---|---|
Applies to | text fields |
Inherited | no |
Media | interactive |
Computed value | as specified |
Animation type | discrete |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
The ime-mode
property is specified using one of the keyword values listed below.
auto
normal
active
inactive
disabled
auto | normal | active | inactive | disabled
This example disables input method support for a form field. In the past, this was commonly used on fields that entered data into databases which didn't support extended character sets.
<input type="text" name="name" value="initial value" style="ime-mode: disabled">
Note: You shouldn't rely on disabling IME to prevent extended characters from passing through your form. Even with IME disabled, users can still paste extended characters into your form's fields.
Unlike Internet Explorer, Firefox's implementation of ime-mode
allows this property on <input type="password">
. However, this makes for a bad user experience, and password fields should not enable the IME. Users may correct the inappropriate behavior of sites that don't follow this recommendation by placing the following CSS into their user stylesheet:
input[type=password] { ime-mode: auto !important; }
The Mac version of Gecko 1.9 (Firefox 3) can't recover the previous state of the IME when a field for which it is disabled loses focus, so Mac users may get grumpy when you use the disabled
value.
Specification | Status | Comment |
---|---|---|
CSS Basic User Interface Module Level 3 The definition of 'ime-mode' in that specification. | Recommendation | Initial definition. Makes ime-mode officially obsolete. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | No | ? | 3 | 5
|
No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? | ? | Yes | ? | ? | ? | No |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode