Skip to content

Commit

Permalink
MM-12053 Increase max height of post textbox (mattermost#1746)
Browse files Browse the repository at this point in the history
* MM-12053 Increase max height of post textbox in desktop view

* Scroll RHS to bottom after updating comment box height
  • Loading branch information
hmhealey committed Sep 26, 2018
1 parent a8451b5 commit 52774e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/create_comment/create_comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ export default class CreateComment extends React.PureComponent {
const {draft} = this.state;
const updatedDraft = {...draft, message};
this.props.onUpdateCommentDraft(updatedDraft);
this.setState({draft: updatedDraft});

this.scrollToBottom();
this.setState({draft: updatedDraft}, () => {
this.scrollToBottom();
});
}

handleKeyDown = (e) => {
Expand Down
1 change: 1 addition & 0 deletions sass/layout/_post-right.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
}

.custom-textarea {
max-height: calc(50vh - 80px);
min-height: 100px;
}

Expand Down
2 changes: 1 addition & 1 deletion sass/layout/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@

.custom-textarea {
bottom: 0;
max-height: 162px;
max-height: calc(50vh - 40px);
overflow: hidden;
padding: 12px 0 12px 15px;
resize: none;
Expand Down
6 changes: 5 additions & 1 deletion sass/responsive/_mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
display: block;
}

.custom-textarea {
max-height: 162px;
}

textarea {
.app-content & {
border-left: none;
Expand Down Expand Up @@ -1965,4 +1969,4 @@ label {
input {
font-size: 16px;
}
}
}

0 comments on commit 52774e8

Please sign in to comment.