Closed Bug 81356 Opened 23 years ago Closed 23 years ago

Editor needs to call ForceCompositionEnd() for IME at losing input focus

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: masaki.katakai, Assigned: Brade)

References

Details

(Keywords: inputmethod, intl, Whiteboard: [I18n])

Attachments

(1 file, 1 obsolete file)

In nsTextEditorFocusListener::Blur(), editor should call ForceCompositionEnd()
if imeEditor exists to inform "focus is leaving from this widget" to IME.

IME wants to know the timing by ResetInputState(), then IME has to
do reset the state of IME engine, clear the composition text, then call
NS_COMPOSITION_END to close the composition event.

Yes, I can see nsTextEditorMouseListener::MouseClick() calls ForceCompositionEnd(),
but it's not enough because the event happens on destination widget, there is no way
to send composition event to *original* widget in ResetInputState().
Attached patch proposed patch (obsolete) — Splinter Review
Blocks: 53025
Keywords: intl
assigning to sfraser for review of patch
Assignee: beppe → sfraser
Priority: -- → P3
Target Milestone: --- → mozilla0.9.1
That patch looks pretty good.
Status: NEW → ASSIGNED
Thank you very much for review, 

But can you wait check-in? because I have to verify the
patch will not break current ResetInputState() codes of
all platforms. I'll ask each platform owner to verify.
r/sr=kin@netscape.com as long as testing has been done to ensure there are no 
IME related regressions on other platforms.
One other question, some platforms pop up a seperate window when IME is 
activated will this generate an unexpected Blur()?
Hi Kin,

Yes, some of Linux IME invokes separate window to display candidates.
I put the codes long ago not to commit at the case (for the original
problem that ResetInputState() is called when the window gets focus
at dismissing candidate window).

I understand Windows IME will not grab any input focus -> it should work
But I need to check Mac, and other platforms.
Is this ready to go in? You have until midnight tomorrow :)
Sorry, I haven't got results on Windows and Mac yet.

For safety, should we move to 0.9.2?
Yes
Target Milestone: mozilla0.9.1 → mozilla0.9.2
it looks ok to me other than missing the space after the "if"
Whiteboard: [I18n]
Masakai: what's the status on this bug? Have you tested Windows and Mac?
Sorry for late.

Ready to check in for 0.9.2. I got no problem from Windows, Mac, UNIX side.
(See bug 81360, bug 81365 abd bug 81364)
Sorry again. I found crash problem on Linux with this fix. Please wait
until I can provide fix for widget/gtk.
*** Bug 81365 has been marked as a duplicate of this bug. ***
*** Bug 81364 has been marked as a duplicate of this bug. ***
I blieve this patch itself is correct fix but gtk has a problem
of bug 81360. No problems for windows and mac.
Depends on: 81360
So should this be checked in?
On second thoughts: reassigning to katakai@japan.sun.com. When this is ready to 
go, give it back to me.
Assignee: sfraser → katakai
Status: ASSIGNED → NEW
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Target Milestone: mozilla0.9.3 → mozilla1.0
Sorry for slow progress.

I finally have fixed the GTK problem (bug 81360). So ready to check in
the patch for Editor.

Simon, can you take this?

Reassigned to Simon.
Assignee: katakai → sfraser
Editor folks,

Is it possible to check in after 0.9.5?

Thanks.
I'll take this bug from Simon since he isn't doing much editor stuff anymore.
I'd like ftang or someone on his team to review this in addition to myself and a 
super-reviewer.
Assignee: sfraser → brade
Keywords: patch
Comment on attachment 34920 [details] [diff] [review]
sorry, ignore the first attachment, this is correct one.

r=ftang
Attachment #34920 - Flags: review+
add yokoyama to the cc list. This could also cause the Chinese IME type abc to
cba issue. We have another work around for that already in the branch. 

brade- please ask yokoyama for future IME related review. Katakai know IME code
prety well aslo (he and tajima wrote the GTK IME code)
Attachment #34918 - Attachment is obsolete: true
Target Milestone: mozilla1.0 → mozilla0.9.6
Comment on attachment 34920 [details] [diff] [review]
sorry, ignore the first attachment, this is correct one.

sr=sfraser
Attachment #34920 - Flags: superreview+
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.7
this fix was checked in (revision 1.192)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Masaki, please verify this bug when you get chance..let us know if it is fixed.

thanks.
Thank you very much.

I have verified the fix on 1118 nightlies on both Windows and Linux.
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: