diff options
author | Olli Pettay <Olli.Pettay@helsinki.fi> | 2018-05-30 17:04:18 +0300 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-07 15:48:33 +0200 |
commit | c631245c9c387850b9a0c0184135d9fa27aaef15 (patch) | |
tree | a43cbc5db71fc1da85cb22d4fa747ff09119fff2 | |
parent | c951c985c1738a951a0e851710cf6c355671afd1 (diff) | |
download | uxp-c631245c9c387850b9a0c0184135d9fa27aaef15.tar.gz |
Bug 1459693 - 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 d09bc31030..e9086933b7 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -3546,7 +3546,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; |