PreventDefault in html editors for normal typing (letters/numbers/etc) (bug 158672, r=timeless, sr=smfr)
git-svn-id: svn://10.0.0.236/trunk@129825 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1244,6 +1244,7 @@ NS_IMETHODIMP nsHTMLEditor::HandleKeyPress(nsIDOMKeyEvent* aKeyEvent)
|
||||
// Either way, treat as normal character.
|
||||
if (character && !altKey && !ctrlKey && !isShift && !metaKey)
|
||||
{
|
||||
aKeyEvent->PreventDefault();
|
||||
nsAutoString key(character);
|
||||
return TypedText(key, eTypedText);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user