From 85aa0cb46d0dd7b97ae913b8732a212985f52eb4 Mon Sep 17 00:00:00 2001 From: llcc Date: Thu, 5 May 2022 10:15:25 +0800 Subject: [PATCH] remove listen to textarea height change --- src/main/frontend/components/editor.cljs | 3 +-- src/main/frontend/handler/editor.cljs | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/frontend/components/editor.cljs b/src/main/frontend/components/editor.cljs index 25115483c0..1b1d6fd10f 100644 --- a/src/main/frontend/components/editor.cljs +++ b/src/main/frontend/components/editor.cljs @@ -525,7 +525,7 @@ (mixins/event-mixin setup-key-listener!) (shortcut/mixin :shortcut.handler/block-editing-only) lifecycle/lifecycle - [state {:keys [format block]} id config] + [state {:keys [format block]} id _config] (let [content (state/sub-edit-content) heading-class (get-editor-style-class content format)] [:div.editor-inner {:class (if block "block-editor" "non-block-editor")} @@ -542,7 +542,6 @@ :on-click (editor-handler/editor-on-click! id) :on-change (editor-handler/editor-on-change! block id search-timeout) :on-paste (editor-handler/editor-on-paste! id) - :on-height-change (editor-handler/editor-on-height-change! id) :auto-focus false :class heading-class}) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 118c4f2c71..84d221e860 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -2793,12 +2793,6 @@ (util/scroll-editor-cursor input) (close-autocomplete-if-outside input)))) -(defn editor-on-height-change! - [id] - (fn [_box-height ^js _row-height] - (let [input (gdom/getElement id)] - (util/scroll-editor-cursor input)))) - (defn editor-on-change! [block id search-timeout] (fn [e]