Index: src/wp-includes/js/media/views/modal.js
===================================================================
--- src/wp-includes/js/media/views/modal.js	(revision 38649)
+++ src/wp-includes/js/media/views/modal.js	(working copy)
@@ -24,6 +24,8 @@
 		'keydown': 'keydown'
 	},
 
+	clickedOpenerEl: null,
+
 	initialize: function() {
 		_.defaults( this.options, {
 			container: document.body,
@@ -91,6 +93,8 @@
 			return this;
 		}
 
+		this.clickedOpenerEl = document.activeElement;
+
 		if ( ! this.views.attached ) {
 			this.attach();
 		}
@@ -141,8 +145,12 @@
 		// Hide modal and remove restricted media modal tab focus once it's closed
 		this.$el.hide().undelegate( 'keydown' );
 
-		// Put focus back in useful location once modal is closed
-		$('#wpbody-content').focus();
+		// Put focus back in useful location once modal is closed.
+		if ( null !== this.clickedOpenerEl ) {
+			this.clickedOpenerEl.focus();
+		} else {
+			$( '#wpbody-content' ).focus();
+		}
 
 		this.propagate('close');
 
Index: src/wp-includes/js/media-editor.js
===================================================================
--- src/wp-includes/js/media-editor.js	(revision 38649)
+++ src/wp-includes/js/media-editor.js	(working copy)
@@ -1111,13 +1111,6 @@
 
 					event.preventDefault();
 
-					// Remove focus from the `.insert-media` button.
-					// Prevents Opera from showing the outline of the button
-					// above the modal.
-					//
-					// See: https://core.trac.wordpress.org/ticket/22445
-					elem.blur();
-
 					if ( elem.hasClass( 'gallery' ) ) {
 						options.state = 'gallery';
 						options.title = wp.media.view.l10n.createGalleryTitle;
Index: src/wp-includes/js/media-views.js
===================================================================
--- src/wp-includes/js/media-views.js	(revision 38649)
+++ src/wp-includes/js/media-views.js	(working copy)
@@ -6698,6 +6698,8 @@
 		'keydown': 'keydown'
 	},
 
+	clickedOpenerEl: null,
+
 	initialize: function() {
 		_.defaults( this.options, {
 			container: document.body,
@@ -6765,6 +6767,8 @@
 			return this;
 		}
 
+		this.clickedOpenerEl = document.activeElement;
+
 		if ( ! this.views.attached ) {
 			this.attach();
 		}
@@ -6815,8 +6819,12 @@
 		// Hide modal and remove restricted media modal tab focus once it's closed
 		this.$el.hide().undelegate( 'keydown' );
 
-		// Put focus back in useful location once modal is closed
-		$('#wpbody-content').focus();
+		// Put focus back in useful location once modal is closed.
+		if ( null !== this.clickedOpenerEl ) {
+			this.clickedOpenerEl.focus();
+		} else {
+			$( '#wpbody-content' ).focus();
+		}
 
 		this.propagate('close');
 
