|
@@ -178,6 +178,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
+ const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;
|
|
|
if (!cellElements) {
|
|
|
menuElement.innerHTML = getEditHTML({protyle, data, colId, isCustomAttr});
|
|
|
bindEditEvent({protyle, data, menuElement, isCustomAttr, blockID});
|
|
@@ -203,6 +204,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
menuElement.innerHTML = getSelectHTML(data.view, cellElements);
|
|
|
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
|
|
|
}
|
|
|
+ menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll;
|
|
|
});
|
|
|
if (menu.isOpen) {
|
|
|
return;
|
|
@@ -251,6 +253,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
+ const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;
|
|
|
if (!cellElements) {
|
|
|
menuElement.innerHTML = getEditHTML({protyle, data, colId, isCustomAttr});
|
|
|
bindEditEvent({protyle, data, menuElement, isCustomAttr, blockID});
|
|
@@ -276,6 +279,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
menuElement.innerHTML = getSelectHTML(data.view, cellElements);
|
|
|
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
|
|
|
}
|
|
|
+ menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll;
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -325,6 +329,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
+ const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;
|
|
|
if (!cellElements) {
|
|
|
menuElement.innerHTML = getEditHTML({protyle, data, colId, isCustomAttr});
|
|
|
bindEditEvent({protyle, data, menuElement, isCustomAttr, blockID});
|
|
@@ -351,6 +356,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|
|
menuElement.innerHTML = getSelectHTML(data.view, cellElements);
|
|
|
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
|
|
|
}
|
|
|
+ menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll;
|
|
|
name = inputElement.value;
|
|
|
color = (index + 1).toString();
|
|
|
return true;
|
|
@@ -528,9 +534,11 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
|
|
|
if (colData.type === "select") {
|
|
|
menuElement.parentElement.remove();
|
|
|
} else {
|
|
|
+ const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;
|
|
|
menuElement.innerHTML = getSelectHTML(data.view, cellElements);
|
|
|
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
|
|
|
menuElement.querySelector("input").focus();
|
|
|
+ menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll;
|
|
|
}
|
|
|
};
|
|
|
|