Bug 1459693 - Ensure the right anonymous element is focused when calling input.focus().

This commit is contained in:
Olli Pettay authored and wolfbeast committed 2018-06-07 15:48:33 +02:00
1 parent cea3faab03
commit 579dfc09eb
1 file changed
+2 -1
+2 -1
View File
@@ -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;