Make WordPress Core

Changeset 27555


Ignore:
Timestamp:
03/15/2014 05:13:23 AM (9 years ago)
Author:
nacin
Message:

Themes screens: Lose search input focus when pressing enter.

This allows the keyboard to close on iOS, for example.

props matveb.
fixes #27233.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r27509 r27555  
    802802        if ( event.type === 'keyup' && event.which === 27 ) {
    803803            event.target.value = '';
     804        }
     805
     806        // Lose input focus when pressing enter
     807        if ( event.which === 13 ) {
     808            this.$el.trigger( 'blur' );
    804809        }
    805810
Note: See TracChangeset for help on using the changeset viewer.