Skip to content

Commit f7085f7

Browse files
authored
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.
1 parent 2b9df56 commit f7085f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/features/repo-issue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export function initRepoPullRequestReview() {
462462
(async () => {
463463
// 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; }`
464464
// 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
465-
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'});
465+
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px', maxHeight: 'calc(100vh - 360px)'});
466466
initCompImagePaste($reviewBox);
467467
})();
468468
}

0 commit comments

Comments
 (0)