aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle D <kdumontnu@gmail.com>2022-02-23 13:17:14 -0700
committerGitHub <noreply@github.com>2022-02-23 20:17:14 +0000
commitf7085f718bf58dc5fc2d843ad1b0171b748fc153 (patch)
tree1c2cc09256673588f5525474a784fd649708dc46
parent2b9df564b858a9216ffb7881278f485b35946349 (diff)
downloadgitea-f7085f718bf58dc5fc2d843ad1b0171b748fc153.tar.gz
gitea-f7085f718bf58dc5fc2d843ad1b0171b748fc153.zip
Set max text height to prevent overflow (#18862)
Sets a max height for review text boxes to prevent a very annoying bug where users cannot access the "submit" button. Before: ![image](https://user-images.githubusercontent.com/12700993/155253001-e1dab086-aaf3-4338-889d-6a861728274a.png) After: ![image](https://user-images.githubusercontent.com/12700993/155253144-5b9a3547-9582-412f-867f-41a45a14a0fe.png) Interestingly, I don't see this bug on Firefox.
-rw-r--r--web_src/js/features/repo-issue.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index bdb75842f8..4f791c7704 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -462,7 +462,7 @@ export function initRepoPullRequestReview() {
(async () => {
// the editor's height is too large in some cases, and the panel cannot be scrolled with page now because there is `.repository .diff-detail-box.sticky { position: sticky; }`
// the temporary solution is to make the editor's height smaller (about 4 lines). GitHub also only show 4 lines for default. We can improve the UI (including Dropzone area) in future
- await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'});
+ await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px', maxHeight: 'calc(100vh - 360px)'});
initCompImagePaste($reviewBox);
})();
}