@elementor/editor-controls 3.35.0-403 → 3.35.0-405

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
@@ -6017,9 +6017,10 @@ var UrlPopover = ({
6017
6017
  placeholder: (0, import_i18n50.__)("Type a URL", "elementor"),
6018
6018
  inputProps: { ref: inputRef },
6019
6019
  color: "secondary",
6020
- InputProps: { sx: { borderRadius: "8px" } }
6020
+ InputProps: { sx: { borderRadius: "8px" } },
6021
+ onKeyUp: (event) => event.key === "Enter" && handleClose()
6021
6022
  }
6022
- ), /* @__PURE__ */ React99.createElement(
6023
+ ), /* @__PURE__ */ React99.createElement(import_ui85.Tooltip, { title: (0, import_i18n50.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React99.createElement(
6023
6024
  import_ui85.ToggleButton,
6024
6025
  {
6025
6026
  size: "tiny",
@@ -6030,7 +6031,7 @@ var UrlPopover = ({
6030
6031
  sx: { borderRadius: "8px" }
6031
6032
  },
6032
6033
  /* @__PURE__ */ React99.createElement(import_icons33.ExternalLinkIcon, { fontSize: "tiny" })
6033
- ))
6034
+ )))
6034
6035
  );
6035
6036
  };
6036
6037
 
@@ -6210,6 +6211,9 @@ var InlineEditorToolbar = ({ editor }) => {
6210
6211
  };
6211
6212
 
6212
6213
  // src/components/inline-editor.tsx
6214
+ var ITALIC_KEYBOARD_SHORTCUT = "i";
6215
+ var BOLD_KEYBOARD_SHORTCUT = "b";
6216
+ var UNDERLINE_KEYBOARD_SHORTCUT = "u";
6213
6217
  var INITIAL_STYLE = "margin:0;padding:0;";
6214
6218
  var useOnUpdate = (callback, dependencies) => {
6215
6219
  const hasMounted = (0, import_react55.useRef)(false);
@@ -6280,6 +6284,12 @@ var InlineEditor = (0, import_react55.forwardRef)(
6280
6284
  if (event.key === "Escape") {
6281
6285
  onBlur?.(event);
6282
6286
  }
6287
+ if (!event.metaKey && !event.ctrlKey || event.altKey) {
6288
+ return;
6289
+ }
6290
+ if ([ITALIC_KEYBOARD_SHORTCUT, BOLD_KEYBOARD_SHORTCUT, UNDERLINE_KEYBOARD_SHORTCUT].includes(event.key)) {
6291
+ event.stopPropagation();
6292
+ }
6283
6293
  };
6284
6294
  const toolbarRelatedListeners = showToolbar ? {
6285
6295
  mouseup: onSelectionEnd,