WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/15/2008 10:57:47 PM (13 years ago)
Author:
westi
Message:

Switch from addLoadEvent to jQuery(document).ready. Fixes #6241 props azaozz.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r7310 r7325  
    6767
    6868<?php echo $form_extra ?>
    69 <?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
    70 <script type="text/javascript">
    71 function focusit() {
    72     // focus on first input field
    73     document.post.title.focus();
    74 }
    75 addLoadEvent(focusit);
    76 </script>
    77 <?php endif; ?>
     69
    7870<div id="poststuff">
    7971
     
    353345
    354346</form>
     347
     348<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
     349<script type="text/javascript">
     350try{document.post.title.focus();}catch(e){}
     351</script>
     352<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.