Media Grid/Modal Keyboard navigation improvements:

* Add focus to arrows on Next/Previous in the grid's modal on left/right keypress, and add the necessary CSS for `:focus`
* When in a disabled input in the grid modal, allow the left/right keys to work
* Make the image editor return a `$.Deferred` so that there isn't a race condition with UI loading. 
* Assign focus when the edit image mode is rendered so that the modal can be closed on Esc press

Props wonderboymusic, adamsilverstein (for the initial patch).
See #23560.

Built from https://develop.svn.wordpress.org/trunk@29560


git-svn-id: http://core.svn.wordpress.org/trunk@29335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2014-08-21 02:35:17 +00:00
parent 53c047263b
commit 6352d703a0
10 changed files with 55 additions and 34 deletions

View File

@@ -2717,6 +2717,12 @@
*
* This should be OOCSS'd so both use a shared selector.
*/
.edit-attachment-frame {
display: block;
height: 100%;
width: 100%;
}
.edit-attachment-frame .edit-media-header {
overflow: hidden;
}
@@ -2773,8 +2779,10 @@
font-weight: 300;
}
.edit-attachment-frame .edit-media-header .left:hover,
.edit-attachment-frame .edit-media-header .right:hover,
.edit-attachment-frame .edit-media-header .left:hover {
.edit-attachment-frame .edit-media-header .left:focus,
.edit-attachment-frame .edit-media-header .right:focus {
color: #2ea2cc;
}

File diff suppressed because one or more lines are too long

View File

@@ -2717,6 +2717,12 @@
*
* This should be OOCSS'd so both use a shared selector.
*/
.edit-attachment-frame {
display: block;
height: 100%;
width: 100%;
}
.edit-attachment-frame .edit-media-header {
overflow: hidden;
}
@@ -2773,8 +2779,10 @@
font-weight: 300;
}
.edit-attachment-frame .edit-media-header .left:hover,
.edit-attachment-frame .edit-media-header .right:hover,
.edit-attachment-frame .edit-media-header .left:hover {
.edit-attachment-frame .edit-media-header .left:focus,
.edit-attachment-frame .edit-media-header .right:focus {
color: #2ea2cc;
}

File diff suppressed because one or more lines are too long