@orion-studios/payload-studio 0.6.0-beta.56 → 0.6.0-beta.57

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.
@@ -786,9 +786,12 @@ var bindEditablePreview = (view, editor) => {
786
786
  const listIndex = Number(element.dataset.orionEditIndex);
787
787
  const listAttr = listName ? propToAttrName(listName) : "";
788
788
  element.setAttribute("title", element.getAttribute("aria-label") || element.textContent?.trim() || "Section action");
789
- element.addEventListener("click", (event) => {
789
+ const runAction = (event) => {
790
790
  event.preventDefault();
791
791
  event.stopPropagation();
792
+ if (typeof event.stopImmediatePropagation === "function") {
793
+ event.stopImmediatePropagation();
794
+ }
792
795
  editor.select?.(view.model);
793
796
  if (!listAttr) {
794
797
  return;
@@ -819,6 +822,12 @@ var bindEditablePreview = (view, editor) => {
819
822
  model: view.model
820
823
  });
821
824
  }
825
+ };
826
+ element.addEventListener("pointerdown", runAction, true);
827
+ element.addEventListener("keydown", (event) => {
828
+ if (event.key === "Enter" || event.key === " ") {
829
+ runAction(event);
830
+ }
822
831
  });
823
832
  });
824
833
  root.querySelectorAll("[data-orion-edit-field]").forEach((element) => {
@@ -662,9 +662,12 @@ var bindEditablePreview = (view, editor) => {
662
662
  const listIndex = Number(element.dataset.orionEditIndex);
663
663
  const listAttr = listName ? propToAttrName(listName) : "";
664
664
  element.setAttribute("title", element.getAttribute("aria-label") || element.textContent?.trim() || "Section action");
665
- element.addEventListener("click", (event) => {
665
+ const runAction = (event) => {
666
666
  event.preventDefault();
667
667
  event.stopPropagation();
668
+ if (typeof event.stopImmediatePropagation === "function") {
669
+ event.stopImmediatePropagation();
670
+ }
668
671
  editor.select?.(view.model);
669
672
  if (!listAttr) {
670
673
  return;
@@ -695,6 +698,12 @@ var bindEditablePreview = (view, editor) => {
695
698
  model: view.model
696
699
  });
697
700
  }
701
+ };
702
+ element.addEventListener("pointerdown", runAction, true);
703
+ element.addEventListener("keydown", (event) => {
704
+ if (event.key === "Enter" || event.key === " ") {
705
+ runAction(event);
706
+ }
698
707
  });
699
708
  });
700
709
  root.querySelectorAll("[data-orion-edit-field]").forEach((element) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.56",
3
+ "version": "0.6.0-beta.57",
4
4
  "description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",