From 4f70de3aa980b2851d0c0208c23b7f4ff0d76822 Mon Sep 17 00:00:00 2001 From: or-else Date: Sat, 1 Dec 2018 11:34:42 +0300 Subject: [PATCH] make topic title required --- css/base.css | 4 ++-- src/views/info-view.jsx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/css/base.css b/css/base.css index be7ee828..4dcbd0ac 100644 --- a/css/base.css +++ b/css/base.css @@ -762,8 +762,8 @@ i.search { display: flex; flex-direction: column; justify-content: space-around; - width: 3rem; - height: 3rem; + width: inherit; + height: inherit; } .contact-box .text-box { display: flex; diff --git a/src/views/info-view.jsx b/src/views/info-view.jsx index a7f475b9..492589d5 100644 --- a/src/views/info-view.jsx +++ b/src/views/info-view.jsx @@ -216,6 +216,7 @@ class InfoView extends React.Component { } handleFullNameUpdate(fn) { + fn = fn.trim(); if (this.state.fullName !== fn) { this.setState({fullName: fn}); this.props.onTopicDescUpdate(this.props.topic, @@ -449,6 +450,7 @@ class InfoView extends React.Component { placeholder={this.state.groupTopic ? "Group name" : Unknown} readOnly={!this.state.owner} value={this.state.fullName} + required={true} onFinished={this.handleFullNameUpdate} />