summaryrefslogtreecommitdiffstats
path: root/web/react/components/textbox.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-12 12:01:06 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-12 12:01:06 -0500
commitb191b88afed9fc2e0431b76f8348ec5291255909 (patch)
tree6bba4633ad8da1ae956b94e3a1308d8a016c1dbb /web/react/components/textbox.jsx
parent13a251a5ee940383e5a026284275b1f31fb476df (diff)
parentdc1c589369b2b754401159b7896f7fcd3ec4bc47 (diff)
downloadchat-b191b88afed9fc2e0431b76f8348ec5291255909.tar.gz
chat-b191b88afed9fc2e0431b76f8348ec5291255909.tar.bz2
chat-b191b88afed9fc2e0431b76f8348ec5291255909.zip
Merge pull request #1406 from asaadmahmoodspin/ui-improvements
UI Improvements for centre channel due to preview
Diffstat (limited to 'web/react/components/textbox.jsx')
-rw-r--r--web/react/components/textbox.jsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index 82f830038..e6530b941 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -243,7 +243,6 @@ export default class Textbox extends React.Component {
const lht = parseInt($(e).css('lineHeight'), 10);
const lines = e.scrollHeight / lht;
- const previewLinkHeightMod = 20;
let mod = 15;
if (lines < 2.5 || this.props.messageText === '') {
@@ -252,17 +251,17 @@ export default class Textbox extends React.Component {
if (e.scrollHeight - mod < 167) {
$(e).css({height: 'auto', 'overflow-y': 'hidden'}).height(e.scrollHeight - mod);
- $(w).css({height: 'auto'}).height(e.scrollHeight + 2 + previewLinkHeightMod);
+ $(w).css({height: 'auto'}).height(e.scrollHeight + 2);
$(w).closest('.post-body__cell').removeClass('scroll');
if (this.state.preview) {
$(ReactDOM.findDOMNode(this.refs.preview)).css({height: 'auto', 'overflow-y': 'auto'}).height(e.scrollHeight - mod);
}
} else {
$(e).css({height: 'auto', 'overflow-y': 'scroll'}).height(167 - mod);
- $(w).css({height: 'auto'}).height(167 + previewLinkHeightMod);
+ $(w).css({height: 'auto'}).height(163);
$(w).closest('.post-body__cell').addClass('scroll');
if (this.state.preview) {
- $(ReactDOM.findDOMNode(this.refs.preview)).css({height: 'auto', 'overflow-y': 'scroll'}).height(167 - mod);
+ $(ReactDOM.findDOMNode(this.refs.preview)).css({height: 'auto', 'overflow-y': 'scroll'}).height(163);
}
}