Changeset 6602

Show
Ignore:
Timestamp:
01/12/08 15:54:44 (1 year ago)
Author:
ryan
Message:

Don't do form submit when pressing enter in add new tag box. Props mdawaffe. fixes #5629

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/js/post.js

    r6597 r6602  
    7272    jQuery('#jaxtag').prepend('<span id="ajaxtag"><input type="text" name="newtag" id="newtag" class="form-input-tip" size="16" autocomplete="off" value="'+postL10n.addTag+'" /><input type="button" class="button" id="tagadd" value="' + postL10n.add + '"/><input type="hidden"/><input type="hidden"/><span class="howto">'+postL10n.separate+'</span></span>'); 
    7373    jQuery('#tagadd').click( tag_flush_to_text ); 
    74 //  jQuery('#newtag').keydown( tag_press_key ); 
    7574    jQuery('#newtag').focus(function() { 
    7675        if ( this.value == postL10n.addTag ) 
     
    8382 
    8483    // auto-suggest stuff 
    85     jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { onSelect: tag_flush_to_text, delay: 500, minchars: 2 } ); 
     84    jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2 } ); 
     85    jQuery('#newtag').keypress( tag_press_key ); 
    8686 
    8787    // postboxes