Bug 1459693, ensure the right anonymous element is focused when calling input.focus(), r=mccr8

This commit is contained in:
Olli Pettay
2018-05-30 17:04:18 +03:00
parent ec400d5665
commit 0090dd7e52

View File

@@ -3178,7 +3178,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;