fix(client): show description when above line 1
This commit is contained in:
committed by
Ahmad Abdolsaheb
parent
765e72e702
commit
7d1677fc86
@ -890,14 +890,14 @@ const Editor = (props: EditorProps): JSX.Element => {
|
|||||||
// if (
|
// if (
|
||||||
// isEqual({ ..._editor.getPosition() }, { lineNumber: 1, column: 1 })
|
// isEqual({ ..._editor.getPosition() }, { lineNumber: 1, column: 1 })
|
||||||
// ) {
|
// ) {
|
||||||
|
const [top, bottom] = editableRegionBoundaries;
|
||||||
editor.setPosition({
|
editor.setPosition({
|
||||||
lineNumber: editableRegionBoundaries[0] + 1,
|
lineNumber: top + 1,
|
||||||
column: 1
|
column: 1
|
||||||
});
|
});
|
||||||
editor.revealLinesInCenter(
|
|
||||||
editableRegionBoundaries[0],
|
// To prevent descriptionWidget from being out of view
|
||||||
editableRegionBoundaries[1]
|
editor.revealLinesInCenter(top, top === 0 ? 1 : bottom);
|
||||||
);
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user