Bug 504183, crash setting focus on file input that has no frame, r=smaug

This commit is contained in:
Neil Deakin 2009-07-23 10:39:10 -04:00
parent 1076bf5866
commit aaa7feaf96
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<html class="reftest-wait">
<input id="a" type="file">
<script>
function doe() {
var elem = document.getElementById('a');
elem.style.display = "none";
elem.focus();
document.documentElement.className = "";
}
setTimeout(doe, 0);
</script>
</html>

View File

@ -9,3 +9,4 @@ load 382568-1.html
load 423371-1.html
load 451123-1.html
load 453406-1.html
load 504183-1.html

View File

@ -1368,6 +1368,7 @@ nsHTMLInputElement::Focus()
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && element)
fm->SetFocus(element, 0);
break;
}
childFrame = childFrame->GetNextSibling();