Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: editor toolbar opacity 0 when quill is empty

thecodrr3c2d429831c9
diff --git a/apps/web/src/components/editor/editor.css b/apps/web/src/components/editor/editor.css
index eef36cc7f..a26b03192 100644
--- a/apps/web/src/components/editor/editor.css
+++ b/apps/web/src/components/editor/editor.css
@@ -65,7 +65,6 @@
width: 120px !important;
}
.ql-toolbar.ql-snow {
- opacity: 0;
width: 100%;
border: none !important;
border-bottom: 1px solid var(--border) !important;
diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js
index cec968318..db2285dea 100644
--- a/apps/web/src/components/editor/index.js
+++ b/apps/web/src/components/editor/index.js
@@ -148,7 +148,7 @@ function Editor(props) {
position: "sticky",
top: 0,
zIndex: 2,
- height: 45,
+ maxHeight: 45,
overflow: "hidden",
transition: "max-height 500ms linear",
":hover": {
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
index ac8f27fa9..dd8cd6444 100644
--- a/apps/web/src/components/editor/react-quill.js
+++ b/apps/web/src/components/editor/react-quill.js
@@ -163,12 +163,6 @@ export default class ReactQuill extends Component {
this.quill.on("text-change", this.textChangeHandler);
}
- if (onQuillInitialized) {
- this.quill.once("editor-change", () => {
- onQuillInitialized();
- });
- }
-
if (onSave) {
this.quill.keyboard.addBinding(
{
@@ -178,6 +172,8 @@ export default class ReactQuill extends Component {
onSave.bind(this, this.quill)
);
}
+
+ onQuillInitialized();
}
componentWillUnmount() {