From 31cd68bade3362a3c148b5d75c9d5fa531f4f5c0 Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Tue, 3 Nov 2020 16:49:13 -0800 Subject: [PATCH] Fix octo-block css --- webapp/src/components/cardDetail.tsx | 12 +++++++----- webapp/src/styles/main.scss | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/webapp/src/components/cardDetail.tsx b/webapp/src/components/cardDetail.tsx index ca319efd9..d52442a51 100644 --- a/webapp/src/components/cardDetail.tsx +++ b/webapp/src/components/cardDetail.tsx @@ -106,11 +106,13 @@ class CardDetail extends React.Component { text='' placeholderText='Add a description...' onBlur={(text) => { - const block = new MutableTextBlock() - block.parentId = card.id - block.title = text - block.order = cardTree.contents.length * 1000 - mutator.insertBlock(block, 'add card text') + if (text) { + const block = new MutableTextBlock() + block.parentId = card.id + block.title = text + block.order = cardTree.contents.length * 1000 + mutator.insertBlock(block, 'add card text') + } }} /> diff --git a/webapp/src/styles/main.scss b/webapp/src/styles/main.scss index f38fcc72b..0f1a5bab3 100644 --- a/webapp/src/styles/main.scss +++ b/webapp/src/styles/main.scss @@ -190,6 +190,13 @@ hr { width: 100%; padding-right: 126px; + + > * { + flex: 1 1 auto; + } + > .octo-block-margin { + flex: 0 0 auto; + } } .octo-block-margin {