summaryrefslogtreecommitdiff
path: root/extensions/spellcheck
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/spellcheck')
-rw-r--r--extensions/spellcheck/src/mozInlineSpellChecker.cpp10
-rw-r--r--extensions/spellcheck/src/mozInlineSpellChecker.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.cpp b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
index 6ca17885da..37898c818e 100644
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -714,7 +714,7 @@ mozInlineSpellChecker::RegisterEventListeners()
true, false);
piTarget->AddEventListener(NS_LITERAL_STRING("click"), this,
false, false);
- piTarget->AddEventListener(NS_LITERAL_STRING("keypress"), this,
+ piTarget->AddEventListener(NS_LITERAL_STRING("keydown"), this,
false, false);
return NS_OK;
}
@@ -738,7 +738,7 @@ mozInlineSpellChecker::UnregisterEventListeners()
piTarget->RemoveEventListener(NS_LITERAL_STRING("blur"), this, true);
piTarget->RemoveEventListener(NS_LITERAL_STRING("click"), this, false);
- piTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), this, false);
+ piTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), this, false);
return NS_OK;
}
@@ -1916,8 +1916,8 @@ NS_IMETHODIMP mozInlineSpellChecker::HandleEvent(nsIDOMEvent* aEvent)
if (eventType.EqualsLiteral("click")) {
return MouseClick(aEvent);
}
- if (eventType.EqualsLiteral("keypress")) {
- return KeyPress(aEvent);
+ if (eventType.EqualsLiteral("keydown")) {
+ return KeyDown(aEvent);
}
return NS_OK;
@@ -1943,7 +1943,7 @@ nsresult mozInlineSpellChecker::MouseClick(nsIDOMEvent *aMouseEvent)
return NS_OK;
}
-nsresult mozInlineSpellChecker::KeyPress(nsIDOMEvent* aKeyEvent)
+nsresult mozInlineSpellChecker::KeyDown(nsIDOMEvent* aKeyEvent)
{
nsCOMPtr<nsIDOMKeyEvent>keyEvent = do_QueryInterface(aKeyEvent);
NS_ENSURE_TRUE(keyEvent, NS_OK);
diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.h b/extensions/spellcheck/src/mozInlineSpellChecker.h
index 52261f22be..251b5f6f27 100644
--- a/extensions/spellcheck/src/mozInlineSpellChecker.h
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.h
@@ -197,7 +197,7 @@ public:
nsresult Blur(nsIDOMEvent* aEvent);
nsresult MouseClick(nsIDOMEvent* aMouseEvent);
- nsresult KeyPress(nsIDOMEvent* aKeyEvent);
+ nsresult KeyDown(nsIDOMEvent* aKeyEvent);
mozInlineSpellChecker();