diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-03-05 04:57:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 20:57:26 +0000 |
commit | 997deecbfa77fe00d8260da2921073a0565dc735 (patch) | |
tree | 81ba7e651977f250797bbebb6f995a206333f673 /web_src/js | |
parent | 95c8d53d280307568a4637db1eb3ccf28c8dc0a9 (diff) | |
download | gitea-997deecbfa77fe00d8260da2921073a0565dc735.tar.gz gitea-997deecbfa77fe00d8260da2921073a0565dc735.zip |
Fix the editor height in review box (#19003)
Fix the height problem in https://github.com/go-gitea/gitea/pull/18862#issuecomment-1059329539
I have tested this fix.
# Screenshots
### Min-height
<img width="1138" alt="image" src="https://user-images.githubusercontent.com/2114189/156811831-93d4d31a-1b0a-4c4c-a7b4-fafc706133d6.png">
### Max-height
<img width="1126" alt="image" src="https://user-images.githubusercontent.com/2114189/156811889-10ae41de-c63b-45e7-9d89-21a1ed29e58b.png">
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/repo-issue.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 4f791c7704..43ce8a9f1b 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -462,7 +462,8 @@ 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', maxHeight: 'calc(100vh - 360px)'}); + // EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set max-height for .CodeMirror-scroll in CSS. + await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'}); initCompImagePaste($reviewBox); })(); } |