Closed Bug 805766 Opened 12 years ago Closed 12 years ago

[TSF] TSF isn't available on designMode editor

Categories

(Core :: Internationalization, defect)

x86
Windows 7
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: masayuki, Assigned: masayuki)

References

()

Details

(Keywords: inputmethod)

Attachments

(3 obsolete files)

TSF isn't available on designMode editor if focus is moved from another document. If Fx is activated when designMode editor has focus, then, it's available.

The cause is nsFocusManager doesn't call nsIMEStateManager::OnFocusChange() from here:

http://mxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1766

Then, nsIMEStateManager will try to create nsTextStateManager with old focused presContext and fail it.
Status: NEW → ASSIGNED
The patch for this also fixes bug 789881!
Blocks: 789881
Attached patch Patch (obsolete) (deleted) — Splinter Review
I found a bug when I wrote the tests. checkbox, radio button, file input and both types of <select> are focusable even in contenteditable element, but focus event is never fired on the elements.
Attachment #676838 - Flags: review?(enndeakin)
Comment on attachment 676838 [details] [diff] [review]
Patch

You shouldn't be calling CheckIfFocusable here as it can be expensive as it flushes (see bug 792297). You don't need to though, as it should always return true.
Attachment #676838 - Flags: review?(enndeakin) → review-
Attached patch Patch (obsolete) (deleted) — Splinter Review
Is this enough?
Attachment #676838 - Attachment is obsolete: true
Attachment #677358 - Flags: review?(enndeakin)
I'm a bit unclear what this patch is doing. The code you changed only focuses the document and may not focus aContent, yet you pass aContent to OnChangeFocus. Did you mean to pass null?
Attached patch Patch (obsolete) (deleted) — Splinter Review
(In reply to Neil Deakin from comment #5)
> I'm a bit unclear what this patch is doing. The code you changed only
> focuses the document and may not focus aContent, yet you pass aContent to
> OnChangeFocus. Did you mean to pass null?

Ah, okay. How about this.

The problem is, editor's focus event handler try creating nsTextStateManager instance. At this time, IME state must match with the new IME state which is expected by the new focused content.

If the getting focus editor is a designMode editor, the document's focus event would be used by the editor for doing above. At this time, the blurred content is stored in nsIMEStateManager since nsFocusManager doesn't call nsIMEStateManager::OnFocusChange() before dispatching the focus event of document.
Attachment #677358 - Attachment is obsolete: true
Attachment #677358 - Flags: review?(enndeakin)
Attachment #677678 - Flags: review?(enndeakin)
Attachment #677678 - Flags: review?(enndeakin) → review+
https://hg.mozilla.org/mozilla-central/rev/5042f0a60460
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Depends on: 808287
This seems to have caused bug 808287, which is pretty serious.  I've backed this patch out for now to see if the backout fixes bug 808287.

https://hg.mozilla.org/integration/mozilla-inbound/rev/70f7e6ce95b8
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Ehsan Akhgari [:ehsan] from comment #9)
> This seems to have caused bug 808287, which is pretty serious.  I've backed
> this patch out for now to see if the backout fixes bug 808287.
> 
> https://hg.mozilla.org/integration/mozilla-inbound/rev/70f7e6ce95b8

Merge of backout:
https://hg.mozilla.org/mozilla-central/rev/70f7e6ce95b8
Attachment #677678 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/b6bd99bf0c1f
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: