Have first field focus on popup

git-svn-id: https://develop.svn.wordpress.org/trunk@2751 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-08-05 18:30:35 +00:00
parent 5d84ad90d1
commit 19875d4afa
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,8 @@ if (url != null) {
}
function init() {
// Focus form field
document.getElementById('src').focus();
var formObj = document.forms[0];
for (var i=0; i<document.forms[0].align.options.length; i++) {
@ -99,6 +101,7 @@ if (url != null) {
tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
}
</script>
</head>
<body onload="init();">

View File

@ -83,6 +83,8 @@ if (url != null) {
formObj.link_list.options[i].selected = true;
}
}
// Focus form field
document.getElementById('href').focus();
}
function insertLink() {