Skip to content

Instantly share code, notes, and snippets.

@hanford
Created January 2, 2022 18:15
Show Gist options
  • Select an option

  • Save hanford/4f5c2257ef51500cf4182efbe86194fe to your computer and use it in GitHub Desktop.

Select an option

Save hanford/4f5c2257ef51500cf4182efbe86194fe to your computer and use it in GitHub Desktop.
diff --git a/node_modules/slate-react/dist/index.es.js b/node_modules/slate-react/dist/index.es.js
index 852c0a1..aa5a7e3 100644
--- a/node_modules/slate-react/dist/index.es.js
+++ b/node_modules/slate-react/dist/index.es.js
@@ -189,19 +189,19 @@ var Leaf = props => {
renderLeaf = props => /*#__PURE__*/React.createElement(DefaultLeaf, Object.assign({}, props))
} = props;
var placeholderRef = useRef(null);
- useEffect(() => {
- var placeholderEl = placeholderRef === null || placeholderRef === void 0 ? void 0 : placeholderRef.current;
- var editorEl = document.querySelector('[data-slate-editor="true"]');
-
- if (!placeholderEl || !editorEl) {
- return;
- }
-
- editorEl.style.minHeight = "".concat(placeholderEl.clientHeight, "px");
- return () => {
- editorEl.style.minHeight = 'auto';
- };
- }, [placeholderRef, leaf]);
+ // useEffect(() => {
+ // var placeholderEl = placeholderRef === null || placeholderRef === void 0 ? void 0 : placeholderRef.current;
+ // var editorEl = document.querySelector('[data-slate-editor="true"]');
+
+ // if (!placeholderEl || !editorEl) {
+ // return;
+ // }
+
+ // editorEl.style.minHeight = "".concat(placeholderEl.clientHeight, "px");
+ // return () => {
+ // editorEl.style.minHeight = 'auto';
+ // };
+ // }, [placeholderRef, leaf]);
var children = /*#__PURE__*/React.createElement(String, {
key: keyForString++,
isLast: isLast,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment