summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlli Pettay <Olli.Pettay@helsinki.fi>2018-05-30 17:04:18 +0300
committerwolfbeast <mcwerewolf@gmail.com>2018-06-07 15:48:33 +0200
commitc631245c9c387850b9a0c0184135d9fa27aaef15 (patch)
treea43cbc5db71fc1da85cb22d4fa747ff09119fff2
parentc951c985c1738a951a0e851710cf6c355671afd1 (diff)
downloadUXP-c631245c9c387850b9a0c0184135d9fa27aaef15.tar
UXP-c631245c9c387850b9a0c0184135d9fa27aaef15.tar.gz
UXP-c631245c9c387850b9a0c0184135d9fa27aaef15.tar.lz
UXP-c631245c9c387850b9a0c0184135d9fa27aaef15.tar.xz
UXP-c631245c9c387850b9a0c0184135d9fa27aaef15.zip
Bug 1459693 - 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 d09bc3103..e9086933b 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;