Merge pull request #23066 from woocommerce/fix/23055

preventDefault when dismissing store notices
This commit is contained in:
Mike Jolley 2019-03-18 11:12:26 +00:00 committed by GitHub
commit 81a4b81e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -25,9 +25,10 @@ jQuery( function( $ ) {
}
// Set a cookie and hide the store notice when the dismiss button is clicked
$( '.woocommerce-store-notice__dismiss-link' ).click( function() {
$( '.woocommerce-store-notice__dismiss-link' ).click( function( event ) {
Cookies.set( cookieName, 'hidden', { path: '/' } );
$( '.woocommerce-store-notice' ).hide();
event.preventDefault();
});
// Make form field descriptions toggle on focus.