Merge pull request #19416 from woocommerce/fix/17876
Enable selecting with tab key on selectWoo
This commit is contained in:
commit
5740dc15e7
|
@ -5465,12 +5465,11 @@ S2.define('select2/core',[
|
|||
$(document).on('keydown', function (evt) {
|
||||
var key = evt.which;
|
||||
if (self.isOpen()) {
|
||||
if (key === KEYS.ESC || key === KEYS.TAB ||
|
||||
(key === KEYS.UP && evt.altKey)) {
|
||||
if (key === KEYS.ESC || (key === KEYS.UP && evt.altKey)) {
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ENTER) {
|
||||
} else if (key === KEYS.ENTER || key === KEYS.TAB) {
|
||||
self.trigger('results:select', {});
|
||||
|
||||
evt.preventDefault();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5465,12 +5465,11 @@ S2.define('select2/core',[
|
|||
$(document).on('keydown', function (evt) {
|
||||
var key = evt.which;
|
||||
if (self.isOpen()) {
|
||||
if (key === KEYS.ESC || key === KEYS.TAB ||
|
||||
(key === KEYS.UP && evt.altKey)) {
|
||||
if (key === KEYS.ESC || (key === KEYS.UP && evt.altKey)) {
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ENTER) {
|
||||
} else if (key === KEYS.ENTER || key === KEYS.TAB) {
|
||||
self.trigger('results:select', {});
|
||||
|
||||
evt.preventDefault();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -110,7 +110,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
|||
wp_register_script( 'wc-shipping-classes', WC()->plugin_url() . '/assets/js/admin/wc-shipping-classes' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone' ), WC_VERSION );
|
||||
wp_register_script( 'wc-clipboard', WC()->plugin_url() . '/assets/js/admin/wc-clipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
|
||||
wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2.full' . $suffix . '.js', array( 'jquery' ), '4.0.3' );
|
||||
wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.3' );
|
||||
wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.4' );
|
||||
wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), WC_VERSION );
|
||||
wp_localize_script(
|
||||
'wc-enhanced-select',
|
||||
|
|
|
@ -220,7 +220,7 @@ class WC_Frontend_Scripts {
|
|||
'selectWoo' => array(
|
||||
'src' => self::get_asset_url( 'assets/js/selectWoo/selectWoo.full' . $suffix . '.js' ),
|
||||
'deps' => array( 'jquery' ),
|
||||
'version' => '1.0.3',
|
||||
'version' => '1.0.4',
|
||||
),
|
||||
'wc-address-i18n' => array(
|
||||
'src' => self::get_asset_url( 'assets/js/frontend/address-i18n' . $suffix . '.js' ),
|
||||
|
|
Loading…
Reference in New Issue