From 7ba61388a4133590571b7fcfe40aa2c74fb068c1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin <wp@andrewnacin.com> Date: Sat, 10 Nov 2012 04:39:44 +0000 Subject: [PATCH] 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 --- wp-admin/js/media-upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 2d9972a4ae..1c4b8b68cc 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -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;