Use event delegation for Add Media, allowing the event to bubble up to #wpbody. Keeps the Add Media button functional on a second use of QuickPress. fixes #22255.

git-svn-id: http://core.svn.wordpress.org/trunk@22518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-10 04:39:44 +00:00
parent b404fbdb85
commit 7ba61388a4

View File

@ -153,7 +153,7 @@ var tb_position;
},
init: function() {
$('.insert-media').on( 'click', function( event ) {
$('#wpbody').on('click', '.insert-media', function( event ) {
var editor = $(this).data('editor'),
workflow;