@primestyleai/tryon 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/index.js +9 -0
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -450,6 +450,15 @@ function PrimeStyleTryonInner({
|
|
|
450
450
|
if (domResult.buttonClicked) {
|
|
451
451
|
setTimeout(() => {
|
|
452
452
|
const afterClick = scanAfterClick();
|
|
453
|
+
try {
|
|
454
|
+
document.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
|
|
455
|
+
} catch {
|
|
456
|
+
}
|
|
457
|
+
try {
|
|
458
|
+
const closeBtn = document.querySelector("[role=dialog] button[aria-label*=close], [class*=modal] button[class*=close], [aria-modal=true] button");
|
|
459
|
+
if (closeBtn) closeBtn.click();
|
|
460
|
+
} catch {
|
|
461
|
+
}
|
|
453
462
|
if (afterClick.found && afterClick.headers && afterClick.rows) {
|
|
454
463
|
setSizeGuide({ found: true, headers: afterClick.headers, rows: afterClick.rows });
|
|
455
464
|
setSizeGuideFetching(false);
|