Themes screens: Lose search input focus when pressing enter.
This allows the keyboard to close on iOS, for example. props matveb. fixes #27233. Built from https://develop.svn.wordpress.org/trunk@27555 git-svn-id: http://core.svn.wordpress.org/trunk@27398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5d77f8a18a
commit
0f32a52afa
|
@ -803,6 +803,11 @@ themes.view.Search = wp.Backbone.View.extend({
|
|||
event.target.value = '';
|
||||
}
|
||||
|
||||
// Lose input focus when pressing enter
|
||||
if ( event.which === 13 ) {
|
||||
this.$el.trigger( 'blur' );
|
||||
}
|
||||
|
||||
this.collection.doSearch( event.target.value );
|
||||
|
||||
// if search is initiated and key is not return
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue