Bug 278058 non-editable and disappearing character exists on password field when using ATOK

patch by masayuki@d-toybox.com r=timeless sr=bz
This commit is contained in:
timeless%mozdev.org 2005-03-07 12:25:26 +00:00
parent c7e3427285
commit deb268915a
2 changed files with 10 additions and 1 deletions

View File

@ -1009,6 +1009,8 @@ NS_IMETHODIMP nsPlaintextEditor::InsertLineBreak()
NS_IMETHODIMP
nsPlaintextEditor::BeginComposition(nsTextEventReply* aReply)
{
NS_ENSURE_TRUE(!mInIMEMode, NS_OK);
if(mFlags & nsIPlaintextEditor::eEditorPasswordMask) {
if (mRules) {
nsIEditRules *p = mRules.get();

View File

@ -5968,7 +5968,14 @@ nsWindow::HandleTextEvent(HIMC hIMEContext,PRBool aCheckAttr)
BOOL
nsWindow::HandleStartComposition(HIMC hIMEContext)
{
NS_ASSERTION(!sIMEIsComposing, "conflict state");
// ATOK send the messages following order at starting composition.
// 1. WM_IME_COMPOSITION
// 2. WM_IME_STARTCOMPOSITION
// We call this function at both step #1 and #2.
// However, the composition start event should occur only once.
if (sIMEIsComposing)
return PR_TRUE;
nsCompositionEvent event(NS_COMPOSITION_START, this);
nsPoint point(0, 0);
CANDIDATEFORM candForm;