From 1fd2ec31fd9cba2d5d6c090db2ea79d6875fede7 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 15 Jan 2021 08:50:19 -0800 Subject: [PATCH] fix: Heading positioning changing between edit/read-only fix: List items beyond #9 chopped --- app/components/Editor.js | 13 ++++--------- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/app/components/Editor.js b/app/components/Editor.js index 67d0cce4..b16effbc 100644 --- a/app/components/Editor.js +++ b/app/components/Editor.js @@ -178,15 +178,10 @@ const StyledEditor = styled(RichMarkdownEditor)` .heading-name { pointer-events: none; - } - - /* pseudo element allows us to add spacing for fixed header */ - /* ref: https://stackoverflow.com/a/28824157 */ - .heading-name::before { - content: ""; - display: ${(props) => (props.readOnly ? "block" : "none")}; - height: 60px; - margin: -60px 0 0; + display: block; + position: relative; + top: -60px; + visibility: hidden; } .heading-name:first-child { diff --git a/package.json b/package.json index 10408602..4de5f386 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "react-waypoint": "^9.0.2", "react-window": "^1.8.6", "reakit": "^1.3.4", - "rich-markdown-editor": "^11.1.2", + "rich-markdown-editor": "^11.1.3", "semver": "^7.3.2", "sequelize": "^6.3.4", "sequelize-cli": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index 9eac4d37..472a862f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10472,10 +10472,10 @@ retry-as-promised@^3.2.0: dependencies: any-promise "^1.3.0" -rich-markdown-editor@^11.1.2: - version "11.1.2" - resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.1.2.tgz#2c31cf23ed9e580be6706b980beeaab8ffae13c0" - integrity sha512-g5j6OAl2mHgbf+m8/RbuBP3ozNHBFpFxclx0AQjfC4m53h+HcGVznBUIZaXeOPu0DqAB2Rrzt+3fVsBxoRCT7w== +rich-markdown-editor@^11.1.3: + version "11.1.3" + resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.1.3.tgz#19873d1489e159543691131f387882712f0c709e" + integrity sha512-ivN/gs/M14KtrViP+MYAWn127JBTfMWgqbn5HWWUPc/el/vUbdBwquOvzjJ/kFppbdolFQMzz+xmdnoP7Zxqog== dependencies: copy-to-clipboard "^3.0.8" lodash "^4.17.11"