Closed Bug 163572 Opened 22 years ago Closed 20 years ago

converting string is inserted every hitting space key

Categories

(Core :: Internationalization, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: skamio, Assigned: tetsuroy)

References

Details

(Keywords: intl)

Attachments

(9 files, 3 obsolete files)

1.65 KB, patch
mikepinkerton
: review+
bryner
: superreview+
Details | Diff | Splinter Review
1.67 KB, patch
pavlov
: review+
bryner
: superreview+
Details | Diff | Splinter Review
1.75 KB, patch
mikepinkerton
: review+
bryner
: superreview+
Details | Diff | Splinter Review
1.65 KB, patch
amardare
: review+
bryner
: superreview+
Details | Diff | Splinter Review
2.70 KB, patch
emaijala+moz
: review+
bryner
: superreview+
Details | Diff | Splinter Review
1.70 KB, patch
sfraser_bugs
: review+
sfraser_bugs
: superreview+
Details | Diff | Splinter Review
1.50 KB, patch
Details | Diff | Splinter Review
781 bytes, patch
roc
: review+
Details | Diff | Splinter Review
12.23 KB, patch
Details | Diff | Splinter Review
IME converting string is inserted repeatedly every hitting space key.

Steps to reproduce:
1. Open a page which have textareas like this page.
2. Click on blank area (not on textarea).
3. Turn on IME.
4. Type some string. e.g. "kanji"
5. Click on textarea.
6. Hit space key to convert.
-> you'll see that converting string is inserted every hitting space key.
Japanese Bugzilla has descriptions about this bug in japanese.
http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=2515
Followings are the summary.

In my disgnosis,
nsEditor::mInIMEMode (a flag indicates IME on/off) is confusing in this bug.
Because we turn IME on not in textarea but in blank area.
So, CreateTxnForInsertText() is executed.
We should execute CreateTxnForIMEText().
http://lxr.mozilla.org/seamonkey/source/editor/libeditor/base/nsEditor.cpp#2362

The solution is to prevent us from turing IME on/off at un-editable area.
For it, we should check widget is editable/un-editable when move the focus.
Severity: minor → normal
Keywords: intl
OS is all.
at least in win32, same phenomenon is appeared.

at least, in win32 environment,
if hitting key that is mentioned step '6.' in original comment is not only space
key but also next(another) charactor, strings are also inserted repeatedly.
OS: Linux → All
There are IME useful function 'Find As You Type', 'Link find' and etc.

>The solution is to prevent us from turing IME on/off at un-editable area.
has problems accordingly.
If we cannot use IME in all un-editable area, we cannot find text we need IME
for. That is a regression.
Browser window must be IME able area.

This bug occur Japanese IME at least.

#korean IME seem not to have this bug.

I hope that this bug will become 'ASSIGNED' earlier.
If I click out of textarea during composition in textarea, text of textarea
become composition end.

I think that If I click textarea during composition in 'Find As You Type', we
must send end of composition message OS(IME).
Idea 1:
When we call nsWindow::ResetInputState() everytime after non textarea lost focus
for other widget of this apprication instance get focus.

Idea 2:
When we call nsEditor::ForceCompositionEnd() everytime after textarea get caret.
Oh Idea2 has problem.
>Idea 2:
>When we call nsEditor::ForceCompositionEnd() everytime after textarea get caret.

It is problem that calling nsEditor::ForceCompositionEnd() when menubar get
focus and textarea get focus again.
Attached patch first patch idea (obsolete) — Splinter Review
ForceCompositonEnd Idea.
This is a way fix this bug.
I test it.

I want to call only clear Composition functon Instead of ForceComposisionEnd to
clear unwanted compositon string.
Kamio says #1,
>nsEditor::mInIMEMode (a flag indicates IME on/off) is confusing in this bug.
a flag indicates IME on Composion or not,
This case, nsEditor::StartCompositon not excuse, but status is on composition,
that mismatch cause this bug.
This bug was not reproduced by Mozilla Firebird.
And it reproduced by Camino.

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP; rv:1.7a) Gecko/20040210
Firebird/0.8.0+

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP; rv:1.7a) Gecko/20040211
Camino/0.7+
Still reproduced WinXP.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040210
Firebird/0.8.0+
Attached patch idaa: clear the text (obsolete) — Splinter Review
we also need to edit non windows's nsWindow.cpp...
*** Bug 234617 has been marked as a duplicate of this bug. ***
These patch fixes this bug for Windows only.
Because the |CancelIMEComposition| of nsIKBStateControl is implemented on
Windows only.

On this concept, when the editor gets focus, the editor destruction the IME
composition string.
Sorry. the comment is my mistake.
Attachment #162812 - Attachment is obsolete: true
Attachment #141056 - Attachment is obsolete: true
Attachment #141116 - Attachment is obsolete: true
Attachment #162821 - Flags: superreview?(roc)
Attachment #162821 - Flags: superreview+
Attachment #162821 - Flags: review?(roc)
Attachment #162821 - Flags: review+
Attachment #162817 - Flags: review?(amardare) → review+
Comment on attachment 162816 [details] [diff] [review]
patch for mac(not implemented)

you need to do widget/src/cocoa in addition to widget/src/mac.

r+ on mac, but it'll break camino if you don't do cocoa.
Attachment #162816 - Flags: review?(pinkerton) → review+
Comment on attachment 162814 [details] [diff] [review]
patch for cocoa(not implemented)

my bad, you did do cocoa, i just didn't see it at first glance. sorry!!

r=pink
Attachment #162814 - Flags: review?(pinkerton) → review+
Attachment #162819 - Flags: review?(sfraser) → review+
Attachment #162819 - Flags: superreview?(dveditz)
Attachment #162818 - Flags: review?(emaijala) → review+
Comment on attachment 162815 [details] [diff] [review]
patch for gtk(not implemented)

pavlov:

Please review this patch.
Attachment #162815 - Flags: review?(blizzard) → review?(pavlov)
Comment on attachment 162819 [details] [diff] [review]
patch for editor

sfraser:

Please superreview too.
Attachment #162819 - Flags: superreview?(dveditz) → superreview?(sfraser)
Attachment #162819 - Flags: superreview?(sfraser) → superreview+
Attachment #162815 - Flags: review?(pavlov) → review+
Attachment #162814 - Flags: superreview?(bryner) → superreview+
Attachment #162815 - Flags: superreview?(bryner) → superreview+
Attachment #162816 - Flags: superreview?(bryner) → superreview+
Attachment #162817 - Flags: superreview?(bryner) → superreview+
Attachment #162818 - Flags: superreview?(bryner) → superreview+
Thank you for all reviewers and superreviewers.

Jungshik:
Would you check-in this patch?
patch checked into trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 169076 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: