From 281bf203833e63a95095b13b05d96ae6ee3e9e10 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 5 Aug 2014 19:36:41 +0000 Subject: [PATCH] Media modal/grid: get the proper .attachment width in arrow navigation. Props avryl, see #27423. git-svn-id: https://develop.svn.wordpress.org/trunk@29379 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/css/media-views.css | 5 ----- src/wp-includes/js/media-views.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index ecac256426..ec6ba6fb80 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -1431,7 +1431,6 @@ /** * Spinner */ - .media-frame .spinner { background: url(../images/spinner.gif) no-repeat; -webkit-background-size: 20px 20px; @@ -1653,7 +1652,6 @@ /** * Image Editor */ - .media-modal .imgedit-wrap { position: static; } @@ -2138,9 +2136,6 @@ font-family: Arial, sans-serif; } - - - @media only screen and (max-width: 960px) { .media-frame-content .media-toolbar-primary .search, .media-frame-content .media-toolbar-secondary .attachment-filters { diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 230794383a..8a1e2eecff 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -4798,7 +4798,7 @@ arrowEvent: function( event ) { var attachment = $('.attachments-browser .attachment'), attachmentsWidth = $('.attachments-browser .attachments').width(), - thumbnailWidth = attachment.first().width(), + thumbnailWidth = attachment.first().outerWidth(), thumbnailsPerRow = Math.round( attachmentsWidth / thumbnailWidth ), totalThumnails = attachment.length, totalRows = Math.ceil(totalThumnails/thumbnailsPerRow),