From bf7e81de8e5d2eee6793b2953006de1c21516867 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Tue, 3 Sep 2024 18:39:38 +1200 Subject: [PATCH] [Legacy Settings] Enable Save button on pages with tables (#51102) --- .../changelog/51102-fix-settings-js-save-activation | 4 ++++ plugins/woocommerce/client/legacy/js/admin/settings.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/51102-fix-settings-js-save-activation diff --git a/plugins/woocommerce/changelog/51102-fix-settings-js-save-activation b/plugins/woocommerce/changelog/51102-fix-settings-js-save-activation new file mode 100644 index 00000000000..c19d8648fb1 --- /dev/null +++ b/plugins/woocommerce/changelog/51102-fix-settings-js-save-activation @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix Settings Save button when WP List Tables are present \ No newline at end of file diff --git a/plugins/woocommerce/client/legacy/js/admin/settings.js b/plugins/woocommerce/client/legacy/js/admin/settings.js index afa04cc564a..bc7f4c8b725 100644 --- a/plugins/woocommerce/client/legacy/js/admin/settings.js +++ b/plugins/woocommerce/client/legacy/js/admin/settings.js @@ -98,9 +98,10 @@ event ) { // Toggling WP List Table checkboxes should not trigger navigation warnings. + // Theses checkboxes only select/unselect rows, they don't change the form. if ( $check_column.length && - $check_column.has( event.target ) + $check_column.has( event.target ).length ) { return; }