From 395fd933c93bc3050bb7144d5e9e15a276f6ee45 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Mon, 19 Nov 2012 06:34:41 +0000 Subject: [PATCH] Media: Blur the "Add Images" button when the media modal is opened. fixes #22445, see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22665 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/media-upload.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 6326858a01..735c64d2df 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -435,11 +435,19 @@ var tb_position; init: function() { $('#wpbody').on('click', '.insert-media', function( event ) { - var editor = $(this).data('editor'), + var $this = $(this), + editor = $this.data('editor'), workflow; event.preventDefault(); + // Remove focus from the `.insert-media` button. + // Prevents Opera from showing the outline of the button + // above the modal. + // + // See: http://core.trac.wordpress.org/ticket/22445 + $this.blur(); + if ( ! editor ) return;