Make WordPress Core

Changeset 24059


Ignore:
Timestamp:
04/22/2013 08:52:43 PM (12 years ago)
Author:
nacin
Message:

Wait until keyup to set the slug input on the post page, otherwise the final character is not stored. props SergeyBiryukov, fixes #23613.

File:
1 edited

Legend:

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

    r24046 r24059  
    684684
    685685            slug_value = ( c > full.length / 4 ) ? '' : full;
    686             e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children('input').keypress(function(e){
     686            e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children('input').keypress(function(e) {
    687687                var key = e.keyCode || 0;
    688688                // on enter, just save the new slug, don't save the post
     
    695695                    return false;
    696696                }
     697            }).keyup(function(e) {
    697698                real_slug.val(this.value);
    698699            }).focus();
Note: See TracChangeset for help on using the changeset viewer.