Skip to content

Commit b851694

Browse files
committed
chore: modified the event name for field locking
1 parent 6c759b9 commit b851694

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/visualBuilder/listeners/mouseClick.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function observeEditableElementChanges(
409409
async function checkFieldLockStatus(fieldMetadata: CslpData): Promise<boolean> {
410410
try {
411411
const response = (await visualBuilderPostMessage?.send(
412-
VisualBuilderPostMessageEvents.CHECK_FIELD_LOCK_STATUS,
412+
VisualBuilderPostMessageEvents.CHECK_OR_ACQUIRE_FIELD_LOCK,
413413
{
414414
fieldMetadata: {
415415
content_type_uid: fieldMetadata.content_type_uid,

src/visualBuilder/listeners/mouseHover.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ async function addOutline(params?: AddOutlineParams): Promise<void> {
122122
entryWorkflowStageDetails
123123
);
124124
const currentIsLocked =
125-
isLocked !== undefined
126-
? isLocked
127-
: editableElement.getAttribute("data-field-locked") === "true";
125+
isLocked ??
126+
editableElement.getAttribute("data-field-locked") === "true";
128127
addHoverOutline(
129128
editableElement,
130129
fieldDisabled || isDisabled,
@@ -512,7 +511,7 @@ export async function checkAndApplyFieldLockStatus(
512511
): Promise<{ isLocked: boolean; editableElement: Element | undefined }> {
513512
try {
514513
const response = (await visualBuilderPostMessage?.send(
515-
VisualBuilderPostMessageEvents.CHECK_FIELD_LOCK_STATUS,
514+
VisualBuilderPostMessageEvents.CHECK_OR_ACQUIRE_FIELD_LOCK,
516515
{
517516
fieldMetadata: {
518517
content_type_uid: fieldMetadata.content_type_uid,

0 commit comments

Comments
 (0)