resize the composer when you change rooms

This commit is contained in:
Matthew Hodgson 2015-11-28 22:20:14 +00:00
parent 9befe243b5
commit 52376091cb

View file

@ -69,6 +69,7 @@ module.exports = React.createClass({
original: null, original: null,
index: 0 index: 0
}; };
var self = this;
this.sentHistory = { this.sentHistory = {
// The list of typed messages. Index 0 is more recent // The list of typed messages. Index 0 is more recent
data: [], data: [],
@ -138,6 +139,8 @@ module.exports = React.createClass({
// restore the original text the user was typing. // restore the original text the user was typing.
this.element.value = this.originalText; this.element.value = this.originalText;
} }
self.resizeInput();
return true; return true;
}, },
@ -153,6 +156,7 @@ module.exports = React.createClass({
var text = window.sessionStorage.getItem("input_" + this.roomId); var text = window.sessionStorage.getItem("input_" + this.roomId);
if (text) { if (text) {
this.element.value = text; this.element.value = text;
self.resizeInput();
} }
} }
}; };