Shipping Settings: Highlight text on focus of cost input values (#42689)
This commit is contained in:
parent
f83a2a8ae8
commit
b04c45ee5e
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Select text when focusing cost inputs on Shipping Settings modals.
|
|
@ -4310,8 +4310,6 @@ table.wc_shipping {
|
|||
}
|
||||
|
||||
&.wc-shipping-modal-price {
|
||||
color: #757575;
|
||||
|
||||
&.wc-shipping-currency-position-left,
|
||||
&.wc-shipping-currency-position-left_space {
|
||||
|
||||
|
|
|
@ -345,6 +345,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
shippingMethodView.highlightOnFocus( '.wc-shipping-modal-price' );
|
||||
|
||||
$( document.body ).trigger( 'init_tooltips' );
|
||||
},
|
||||
onConfigureShippingMethodSubmitted: function( event, target, posted_data ) {
|
||||
|
@ -398,6 +400,12 @@
|
|||
|
||||
$( 'table.wc-shipping-zone-methods' ).before( error_html );
|
||||
},
|
||||
highlightOnFocus: function( query ) {
|
||||
const inputs = $( query );
|
||||
inputs.focus( function() {
|
||||
$( this ).select();
|
||||
} );
|
||||
},
|
||||
onAddShippingMethod: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
|
@ -585,6 +593,8 @@
|
|||
status : 'new'
|
||||
}
|
||||
});
|
||||
|
||||
shippingMethodView.highlightOnFocus( '.wc-shipping-modal-price' );
|
||||
} else {
|
||||
shippingMethodView.model.trigger( 'change:methods' );
|
||||
shippingMethodView.model.trigger( 'saved:methods' );
|
||||
|
|
Loading…
Reference in New Issue