- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Fri, 17 Feb 2012 02:03:12 +0800
- To: WWW Style <www-style@w3.org>
(Bcc public-webapps and public-i18n-cjk) 9.2.3. Input method editor: the ‘ime-mode’ property I did some testing about this property[1] to get a sense of what this property is doing exactly. Here are some of the issues: # Applies to: text fields In IE9, 'ime-mode' applies to elements with @contenteditable too although that's not the case for Firefox 10. I think this is a bug in Firefox. The definition of "text fields", which would include elements with @contenteditable, is missing either here or in the HTML spec. I'll note that 'ime-mode' doesn't apply to all focusable elements[2] as defined in the HTML spec since neither IE9 nor Firefox 10 apply 'ime-mode' to <button>, <input type="checkbox">, <a> or <span tabindex="1"> and the like. # The ‘ime-mode’ CSS property controls the state of the input # method editor for text fields. This is too simplified a statement. Upon testing IE9 and FF10, I think the right sentence here is something like | The ‘ime-mode’ CSS property controls whether and how the state of | the input method editor changes when the element gets the focus. | UAs must not change the state of the input method editor without | the focused element being changed. So what this is saying is that changing the style would have no effect before the element gets blurred and focused again, even if the new value is "disabled". There's currently no interoperability problem here I think. # auto # No change is made to the current input method editor state. This is # the default. # # normal # The IME state should be normal; this value can be used in a user # style sheet to override the page setting. I couldn't make sense of the definitions of these two before I did the testing. Example 13 uses 'auto' instead of 'normal' in a user style sheet, which is even more confusing because that doesn't match what the definition explains. I think the right definitions are probably | normal | No change is made to the current input method editor state. | | auto | This is the same as 'normal' besides for password input fields. | When this value is specified on a password input field, it has the | same effect as 'disabled'. . I'll note that the only difference here is when this property is specified on a password input field, which IMO isn't a valid use case. For what it's worth, IE doesn't support 'normal' as long as this property being applied to password input fields and I think the spec should match IE or at least come up with an example use case of 'normal'. (If we are dropping 'normal', I would suggest we rename 'auto' to 'normal' if this is still doable.) For focusable elements that this property doesn't apply, such as <button>, <input type="checkbox">, <a> and <span tabindex="1">, IE9/Windows and Firefox 10/Windows don't allow users to turn on IME when these elements get the focus. On the other hand, Firefox 10/MacOSX does allow users to turn on and off IME and hence I suggest the spec say something like | For elements that this property doesn't apply, UAs should use | platform convention to determine the state of the input method | editor. though I am not sure if this is actually making sense as on Windows all applications except IE allow you to switch IME by default... (I think this is probably the first email about 'ime-mode' on www-style. I don't have high level ideas about whether we should just drop this property at all. People who work on the IME API or HTML markup feature[3] related to this should notice the existence of this property and perhaps we could have something better.) [1] http://www.jslab.org.cn/?tag=imeMode&page=9 [2] http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#focusable [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=12885 Cheers, Kenny
Received on Thursday, 16 February 2012 18:03:57 UTC