mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
do not do TypedText if the character code is 0. r=brade. Fix bug 16570 and 16811
This commit is contained in:
parent
85ff159494
commit
b00215d892
@ -618,12 +618,14 @@ NS_IMETHODIMP nsHTMLEditor::EditorKeyPress(nsIDOMUIEvent* aKeyEvent)
|
||||
}
|
||||
else // normal typing
|
||||
{
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey)
|
||||
&& (PR_FALSE==isShift) && (PR_FALSE==metaKey))
|
||||
{
|
||||
nsAutoString key(character);
|
||||
return TypedText(key, eTypedText);
|
||||
}
|
||||
if(0 != character) {
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey)
|
||||
&& (PR_FALSE==isShift) && (PR_FALSE==metaKey))
|
||||
{
|
||||
nsAutoString key(character);
|
||||
return TypedText(key, eTypedText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -618,12 +618,14 @@ NS_IMETHODIMP nsHTMLEditor::EditorKeyPress(nsIDOMUIEvent* aKeyEvent)
|
||||
}
|
||||
else // normal typing
|
||||
{
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey)
|
||||
&& (PR_FALSE==isShift) && (PR_FALSE==metaKey))
|
||||
{
|
||||
nsAutoString key(character);
|
||||
return TypedText(key, eTypedText);
|
||||
}
|
||||
if(0 != character) {
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey)
|
||||
&& (PR_FALSE==isShift) && (PR_FALSE==metaKey))
|
||||
{
|
||||
nsAutoString key(character);
|
||||
return TypedText(key, eTypedText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user