Closed Bug 415026 Opened 12 years ago Closed 12 years ago

IME is always enabled in a page has contentEditable=true

Categories

(Core :: Internationalization, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: masayuki, Assigned: masayuki)

References

()

Details

(Keywords: inputmethod)

Attachments

(1 file, 2 obsolete files)

Attached patch Patch rv1.0 (obsolete) — Splinter Review
If a page has contentEditable=true, the all content enables IME. Even if the document has HTML Editor, we need to check the current node being editable.
Attachment #300590 - Flags: superreview?(roc)
Attachment #300590 - Flags: review?(roc)
Attached patch Patch rv1.1 (obsolete) — Splinter Review
Oops, I posted old patch, sorry for the spam.
Attachment #300590 - Attachment is obsolete: true
Attachment #300638 - Flags: superreview?(roc)
Attachment #300638 - Flags: review?(roc)
Attachment #300590 - Flags: superreview?(roc)
Attachment #300590 - Flags: review?(roc)
+  if (isEditable && aContent->HasFlag(NODE_IS_EDITABLE))

Isn't it enough to just check NODE_IS_EDITABLE?
(In reply to comment #2)
> +  if (isEditable && aContent->HasFlag(NODE_IS_EDITABLE))
> 
> Isn't it enough to just check NODE_IS_EDITABLE?

No. textarea and input returns TRUE for it. They are support ime-mode now. So, aContent->GetDesiredIMEState() must be called for them. However, ime-mode doesn't support contentEditable element. So, we must not call it in HTML editors.
Then if we have a document which has some contenteditable content, and aContent is in a textarea in the same document but not in a contenteditable region, we're going to return early without checking ime-mode.
Ugh... You're right.
Attached patch Patch rv2.0Splinter Review
We should check whether the content is editable in nsIContent::GetDesiredIMEState(). If it is non-editable, should be IME_STATUS_DISABLE. If it has editable parent, we should use the state for most editable ancestor's. If the parent is not editable, use IME_STATUS_ENABLE.
Attachment #300638 - Attachment is obsolete: true
Attachment #301239 - Flags: superreview?(roc)
Attachment #301239 - Flags: review?(roc)
Attachment #300638 - Flags: superreview?(roc)
Attachment #300638 - Flags: review?(roc)
roc:

would you check the new patch?
Attachment #301239 - Flags: superreview?(roc)
Attachment #301239 - Flags: superreview+
Attachment #301239 - Flags: review?(roc)
Attachment #301239 - Flags: review+
Comment on attachment 301239 [details] [diff] [review]
Patch rv2.0

Thanks.

This feature is a part of a marketing key point for Mozilla Japan. The risk is low, I need to land this.
Attachment #301239 - Flags: approval1.9?
Attachment #301239 - Flags: approval1.9? → approval1.9+
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
regression.

sometimes, cannot change input mode. (cannot input JAPANSESE)
"HANKAKU/ZENKAKU" dose not work.
thanks.
Depends on: 417063
You need to log in before you can comment on or make changes to this bug.