@elementor/editor-controls 3.33.0-217 → 3.33.0-219

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/index.js CHANGED
@@ -797,6 +797,7 @@ var StyledButton = (0, import_ui10.styled)(import_ui10.Button, {
797
797
  }));
798
798
 
799
799
  // src/components/size-control/size-input.tsx
800
+ var RESTRICTED_KEYBOARD_SHORTCUT_UNITS = ["auto"];
800
801
  var SizeInput = ({
801
802
  units: units2,
802
803
  handleUnitChange,
@@ -826,7 +827,7 @@ var SizeInput = ({
826
827
  const newChar = key.toLowerCase();
827
828
  const updatedBuffer = (unitInputBufferRef.current + newChar).slice(-3);
828
829
  unitInputBufferRef.current = updatedBuffer;
829
- const matchedUnit = units2.find((u) => u.includes(updatedBuffer)) || units2.find((u) => u.startsWith(newChar)) || units2.find((u) => u.includes(newChar));
830
+ const matchedUnit = units2.find((u) => !RESTRICTED_KEYBOARD_SHORTCUT_UNITS.includes(u) && u.includes(updatedBuffer)) || units2.find((u) => !RESTRICTED_KEYBOARD_SHORTCUT_UNITS.includes(u) && u.startsWith(newChar)) || units2.find((u) => !RESTRICTED_KEYBOARD_SHORTCUT_UNITS.includes(u) && u.includes(newChar));
830
831
  if (matchedUnit) {
831
832
  handleUnitChange(matchedUnit);
832
833
  }