From 848304e3c03e5f5b98680c740185d333f2f68720 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: http://core.svn.wordpress.org/trunk@24059 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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(); }