mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
fixed bug 13669, wrong password when user typed with 1 or more characters selected
This commit is contained in:
parent
fc5232bd1d
commit
4195b67417
@ -997,6 +997,10 @@ nsTextEditRules::EchoInsertionToPWBuff(nsIDOMSelection *aSelection, nsString *aO
|
||||
PRInt32 start, end;
|
||||
nsresult res = mEditor->GetTextSelectionOffsets(aSelection, start, end);
|
||||
NS_ASSERTION((NS_SUCCEEDED(res)), "getTextSelectionOffsets failed!");
|
||||
if (end!=start)
|
||||
{
|
||||
mPasswordText.Cut(start, end-start);
|
||||
}
|
||||
mPasswordText.Insert(*aOutString, start);
|
||||
|
||||
#ifdef DEBUG_jfrancis
|
||||
|
@ -997,6 +997,10 @@ nsTextEditRules::EchoInsertionToPWBuff(nsIDOMSelection *aSelection, nsString *aO
|
||||
PRInt32 start, end;
|
||||
nsresult res = mEditor->GetTextSelectionOffsets(aSelection, start, end);
|
||||
NS_ASSERTION((NS_SUCCEEDED(res)), "getTextSelectionOffsets failed!");
|
||||
if (end!=start)
|
||||
{
|
||||
mPasswordText.Cut(start, end-start);
|
||||
}
|
||||
mPasswordText.Insert(*aOutString, start);
|
||||
|
||||
#ifdef DEBUG_jfrancis
|
||||
|
Loading…
Reference in New Issue
Block a user