Bug 559754 IME Composition in password field cannot be committed by click (and forceCompositionEnd()) r=smaug

This commit is contained in:
Masayuki Nakano 2010-04-19 21:20:30 +09:00
parent 5f8c48051f
commit 44bdccd814

View File

@ -2085,16 +2085,17 @@ nsEditor::ForceCompositionEnd()
// We should use nsILookAndFeel to resolve this
#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
// XXXmnakano see bug 558976, ResetInputState() has two meaning which are
// "commit the composition" and "cursor is moved". This method name is
// "ForceCompositionEnd", so, ResetInputState() should be used only for the
// former here. However, ResetInputState() is also used for the latter here
// because even if we don't have composition, we call ResetInputState() on
// Linux. Currently, nsGtkIMModule can know the timing of the cursor move,
// so, the latter meaning should be gone and we should remove this #if.
if(! mInIMEMode)
return NS_OK;
#endif
#ifdef XP_UNIX
if(IsPasswordEditor()) {
return NS_OK;
}
#endif
nsCOMPtr<nsIWidget> widget;
nsresult res = GetWidget(getter_AddRefs(widget));
if (NS_FAILED(res))