Fixed an issue where editor position was wrong when editing data from result grid. #5548

This commit is contained in:
Pravesh Sharma 2022-11-25 11:43:56 +05:30 committed by GitHub
parent 6442854fb5
commit a305c03238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,10 +138,13 @@ function setEditorPosition(cellEle, editorEle) {
if ((position.left + editorEle.offsetWidth + 10) > gridEle.offsetWidth) {
position.left -= position.left + editorEle.offsetWidth - gridEle.offsetWidth + 10;
}
if ((cellRect.left > gridEleRect.left) && gridEleRect.left !== 0) {
position.left = cellRect.left - editorEle.offsetWidth + 20;
}
if (cellRect.left < gridEleRect.left) {
position.left = gridEleRect.left + 10;
}
editorEle.style.left = `${position.left}px`;
editorEle.style.left = `${Math.abs(position.left)}px`;
editorEle.style.top = `${position.top}px`;
}