diff options
author | Pale Moon <git-repo@palemoon.org> | 2018-07-01 16:57:15 +0200 |
---|---|---|
committer | Pale Moon <git-repo@palemoon.org> | 2018-07-01 16:57:15 +0200 |
commit | 8b999f2be31cc244afa50f122ff34663c8243b1e (patch) | |
tree | e4b52f4819b272a1ad4c6a5a084af2cda616903b | |
parent | e50a11dfe7bd8920d3bac2ce306fd50a5efa19c6 (diff) | |
download | palemoon-gre-8b999f2be31cc244afa50f122ff34663c8243b1e.tar.gz |
Ensure the right anonymous element is focused when calling input.focus()
-rw-r--r-- | dom/html/HTMLInputElement.cpp | 3 |
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; |