Skip to content

Commit bf91155

Browse files
committed
implement multiline input
1 parent ef181f5 commit bf91155

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

src/skins/vector/css/molecules/MessageComposer.css

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,25 @@ limitations under the License.
1616

1717
.mx_MessageComposer_wrapper {
1818
max-width: 960px;
19-
height: 70px;
2019
vertical-align: middle;
2120
margin: auto;
22-
background-color: #fff;
2321
border-top: 2px solid #e1dddd;
2422
}
2523

2624
.mx_MessageComposer_row {
2725
display: table-row;
2826
width: 100%;
29-
height: 70px;
3027
}
3128

3229
.mx_MessageComposer .mx_MessageComposer_avatar {
3330
display: table-cell;
3431
padding-left: 10px;
3532
padding-right: 28px;
36-
height: 70px;
33+
vertical-align: middle;
3734
}
3835

3936
.mx_MessageComposer .mx_MessageComposer_avatar .mx_MemberAvatar {
4037
display: block;
41-
margin-top: 18px;
4238
}
4339

4440
.mx_MessageComposer_input {
@@ -49,17 +45,18 @@ limitations under the License.
4945
}
5046

5147
.mx_MessageComposer_input textarea {
48+
display: block;
5249
font-size: 15px;
5350
width: 100%;
54-
height: 1.2em;
55-
padding-top: 0.7em;
56-
padding-bottom: 0.7em;
51+
padding: 0px;
52+
margin-top: 6px;
53+
margin-bottom: 6px;
5754
border: 0px;
5855
resize: none;
5956
outline: none;
6057
-webkit-box-shadow: none;
6158
-moz-box-shadow: none;
62-
box-shadow: none;
59+
box-shadow: none;
6360

6461
/* needed for FF */
6562
font-family: 'Myriad Pro', Helvetica, Arial, Sans-Serif;

src/skins/vector/css/organisms/RoomView.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ limitations under the License.
236236
order: 5;
237237

238238
width: 100%;
239-
-webkit-flex: 0 0 70px;
240-
flex: 0 0 70px;
239+
-webkit-flex: 0;
240+
flex: 0;
241241
margin-right: 2px;
242242
}
243243

src/skins/vector/views/molecules/MessageComposer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = React.createClass({
6161
<MemberAvatar member={me} width={24} height={24} />
6262
</div>
6363
<div className="mx_MessageComposer_input">
64-
<textarea ref="textarea" onKeyDown={this.onKeyDown} placeholder="Type a message..." />
64+
<textarea ref="textarea" rows="1" onKeyDown={this.onKeyDown} onKeyUp={this.onKeyUp} placeholder="Type a message..." />
6565
</div>
6666
<div className="mx_MessageComposer_upload" onClick={this.onUploadClick}>
6767
<img src="img/upload.png" width="17" height="22"/>

src/skins/vector/views/organisms/RoomView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ module.exports = React.createClass({
315315
{statusBar}
316316
</div>
317317
</div>
318-
<MessageComposer room={this.state.room} uploadFile={this.uploadFile} />
318+
<MessageComposer room={this.state.room} roomView={this} uploadFile={this.uploadFile} />
319319
</div>
320320
);
321321
}

0 commit comments

Comments
 (0)