@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.
@@ -2439,9 +2439,12 @@ function Action(_ref) {
2439
2439
 
2440
2440
  var listener = function listener(e) {
2441
2441
  // Check if Ctrl (Windows) or Cmd (Mac) key is pressed
2442
- var isCtrlOrCmdPressed = e.ctrlKey || e.metaKey;
2442
+ var isCtrlOrCmdPressed = e.ctrlKey || e.metaKey; // Check if the focus is on an input element or inside a form
2443
2443
 
2444
- if (e.key === shortcutKey && isCtrlOrCmdPressed) {
2444
+ var isInInput = e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement;
2445
+ var isInForm = e.target instanceof Element && e.target.closest('form');
2446
+
2447
+ if (isCtrlOrCmdPressed && !isInInput && !isInForm && e.key === shortcutKey) {
2445
2448
  e.preventDefault();
2446
2449
  runAction();
2447
2450
  }