blob: 903402e264f6f28f8bc434b4f2cce74cee7ff3e3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
summary { -webkit-user-modify: read-write; }
</style>
<script src="../editing.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function focushandler() {
document.activeElement.replaceWith("foo");
}
function runTest() {
window.getSelection().selectAllChildren(optgroup);
select.autofocus = true;
document.execCommand("insertImage", "#foo");
document.write("PASS. WebKit didn't crash.");
}
</script>
</head>
<body onload="runTest()">
<details border="1px">
<summary>
<select id="select" onfocus="focushandler()">
<optgroup id="optgroup">content</optgroup>
</select>
<body>