From c3773f6af2349323cd90eb1f4252e366e0537f08 Mon Sep 17 00:00:00 2001 From: Yurii Zusik Date: Thu, 12 Nov 2020 11:43:55 +0200 Subject: [PATCH] fix(storefront): BCTHEME-319 Write a review modal extra executions (#1902) --- CHANGELOG.md | 1 + assets/js/theme/product.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c4df70c13..8295e2afdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Write a review modal extra executions. [#1902](https://github.com/bigcommerce/cornerstone/pull/1902) ## 4.12.1 (11-10-2020) - Write a Review modal cause TypeError. [#1899](https://github.com/bigcommerce/cornerstone/pull/1899) diff --git a/assets/js/theme/product.js b/assets/js/theme/product.js index 0c4c20020f..900dfd8d9a 100644 --- a/assets/js/theme/product.js +++ b/assets/js/theme/product.js @@ -46,7 +46,7 @@ export default class Product extends PageManager { const review = new Review($reviewForm); - $(document).on('opened.fndtn.reveal', () => this.reviewModal.setupFocusableElements(WRITE_REVIEW)); + $(document).on('opened.fndtn.reveal', '#modal-review-form', () => this.reviewModal.setupFocusableElements(WRITE_REVIEW)); $('body').on('click', '[data-reveal-id="modal-review-form"]', () => { validator = review.registerValidation(this.context);