summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2018-07-01 16:57:15 +0200
committerPale Moon <git-repo@palemoon.org>2018-07-01 16:57:15 +0200
commit8b999f2be31cc244afa50f122ff34663c8243b1e (patch)
treee4b52f4819b272a1ad4c6a5a084af2cda616903b
parente50a11dfe7bd8920d3bac2ce306fd50a5efa19c6 (diff)
downloadpalemoon-gre-8b999f2be31cc244afa50f122ff34663c8243b1e.tar.gz
Ensure the right anonymous element is focused when calling input.focus()
-rw-r--r--dom/html/HTMLInputElement.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
index bae91213e..06e84956f 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3191,7 +3191,8 @@ HTMLInputElement::Focus(ErrorResult& aError)
nsNumberControlFrame* numberControlFrame =
do_QueryFrame(GetPrimaryFrame());
if (numberControlFrame) {
- HTMLInputElement* textControl = numberControlFrame->GetAnonTextControl();
+ RefPtr<HTMLInputElement> textControl =
+ numberControlFrame->GetAnonTextControl();
if (textControl) {
textControl->Focus(aError);
return;