@star-insure/sdk 3.2.11 → 3.2.12

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/sdk.esm.js CHANGED
@@ -2432,9 +2432,12 @@ function Action(_ref) {
2432
2432
 
2433
2433
  var listener = function listener(e) {
2434
2434
  // Check if Ctrl (Windows) or Cmd (Mac) key is pressed
2435
- var isCtrlOrCmdPressed = e.ctrlKey || e.metaKey;
2435
+ var isCtrlOrCmdPressed = e.ctrlKey || e.metaKey; // Check if the focus is on an input element or inside a form
2436
2436
 
2437
- if (e.key === shortcutKey && isCtrlOrCmdPressed) {
2437
+ var isInInput = e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement;
2438
+ var isInForm = e.target instanceof Element && e.target.closest('form');
2439
+
2440
+ if (isCtrlOrCmdPressed && !isInInput && !isInForm && e.key === shortcutKey) {
2438
2441
  e.preventDefault();
2439
2442
  runAction();
2440
2443
  }