From ccfda3dcb1aebfe8e31cd27e3629ac8dc280d6fa Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 22 Apr 2013 20:52:43 +0000 Subject: [PATCH] Wait until keyup to set the slug input on the post page, otherwise the final character is not stored. props SergeyBiryukov, fixes #23613. git-svn-id: https://develop.svn.wordpress.org/trunk@24059 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/post.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 6380eeca1b..38ec832ede 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -683,7 +683,7 @@ jQuery(document).ready( function($) { } slug_value = ( c > full.length / 4 ) ? '' : full; - e.html('').children('input').keypress(function(e){ + e.html('').children('input').keypress(function(e) { var key = e.keyCode || 0; // on enter, just save the new slug, don't save the post if ( 13 == key ) { @@ -694,6 +694,7 @@ jQuery(document).ready( function($) { b.children('.cancel').click(); return false; } + }).keyup(function(e) { real_slug.val(this.value); }).focus(); }