maplibre-gl-geo-editor 0.11.1 → 0.11.2

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.
@@ -21788,7 +21788,9 @@ class GeoEditor {
21788
21788
  // ============================================================================
21789
21789
  setupKeyboardShortcuts() {
21790
21790
  this.boundKeyHandler = (e) => {
21791
- const isInputField = e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLElement && e.target.isContentEditable;
21791
+ const target = e.composedPath()[0] ?? e.target;
21792
+ const isInputField = target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
21793
+ if (isInputField) return;
21792
21794
  if ((e.ctrlKey || e.metaKey) && e.key === "z" && !e.shiftKey) {
21793
21795
  this.undo();
21794
21796
  e.preventDefault();
@@ -21807,7 +21809,7 @@ class GeoEditor {
21807
21809
  this.pasteFeatures();
21808
21810
  e.preventDefault();
21809
21811
  }
21810
- if ((e.key === "Delete" || e.key === "Backspace") && !isInputField && !(e.target instanceof Element && e.target.closest(`.${CSS_PREFIX}-attribute-panel`))) {
21812
+ if ((e.key === "Delete" || e.key === "Backspace") && !(e.target instanceof Element && e.target.closest(`.${CSS_PREFIX}-attribute-panel`))) {
21811
21813
  this.deleteSelectedFeatures();
21812
21814
  e.preventDefault();
21813
21815
  }
@@ -22572,4 +22574,4 @@ exports.safeUnion = safeUnion;
22572
22574
  exports.selectFeaturesWithinLasso = selectFeaturesWithinLasso;
22573
22575
  exports.toSelectedFeatures = toSelectedFeatures;
22574
22576
  exports.toggleInSelection = toggleInSelection;
22575
- //# sourceMappingURL=geo-editor-DgXTVVbG.cjs.map
22577
+ //# sourceMappingURL=geo-editor-DHuNEfQH.cjs.map