Skip to content

Commit

Permalink
Fixes undo bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Jul 22, 2022
1 parent 408363e commit 7cbbc3f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({
);

useEffect(() => {
if (editor1.current) {
if (editor1.current && !isCompactFocused) {
const editorElement = editor1.current.getDomNode();
if (editorElement) {
const contentWidth = Number(editorElement?.style.width.replace('px', ''));
Expand All @@ -259,7 +259,7 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({
}
}
}
}, [calculateVisibleCode, code, queryString]);
}, [calculateVisibleCode, code, isCompactFocused, queryString]);

const onResize = ({ width }: { width: number }) => {
calculateVisibleCode(width);
Expand Down

0 comments on commit 7cbbc3f

Please sign in to comment.