diff --git a/src/components/NewNote/EditBox/EditBox.module.scss b/src/components/NewNote/EditBox/EditBox.module.scss index b1fb713..e4eba4d 100644 --- a/src/components/NewNote/EditBox/EditBox.module.scss +++ b/src/components/NewNote/EditBox/EditBox.module.scss @@ -229,6 +229,7 @@ textarea::-webkit-scrollbar{ .editor { max-width: calc(100% - 14px); min-height: 60px; + max-height: 46vh; outline: 0px solid transparent; word-wrap: break-word; font-size: 16px; diff --git a/src/components/NewNote/EditBox/EditBox.tsx b/src/components/NewNote/EditBox/EditBox.tsx index e88528b..6e0ee22 100644 --- a/src/components/NewNote/EditBox/EditBox.tsx +++ b/src/components/NewNote/EditBox/EditBox.tsx @@ -112,9 +112,11 @@ const EditBox: Component<{ if (elm.scrollHeight >= (maxHeight / 3)) { + elm.style.height = '46vh'; return; } + elm.style.height = 'auto'; elm.rows = minRows; const rows = Math.ceil((elm.scrollHeight - elm._baseScrollHeight) / 20); elm.rows = minRows + rows; @@ -146,7 +148,7 @@ const EditBox: Component<{ return; } - const mentionSeparators = ['Enter', 'Space', 'Comma']; + const mentionSeparators = ['Enter', 'Space', 'Comma', 'Tab']; if (e.code === 'Enter' && e.metaKey) { e.preventDefault();