@seafile/seafile-editor 2.0.9-beta → 2.0.9-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -72,6 +72,9 @@ const SimpleSlateEditor = _ref => {
|
|
|
72
72
|
}
|
|
73
73
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
74
|
}, []);
|
|
75
|
+
const handleWheel = (0, _react.useCallback)(event => {
|
|
76
|
+
event.stopPropagation();
|
|
77
|
+
}, []);
|
|
75
78
|
|
|
76
79
|
// const focusEndNode = useCallback((editor) => {
|
|
77
80
|
// const lastChildIndex = editor.children.length - 1;
|
|
@@ -141,7 +144,8 @@ const SimpleSlateEditor = _ref => {
|
|
|
141
144
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
142
145
|
className: `sf-slate-scroll-container ${isMacOS ? '' : 'isWin'}`
|
|
143
146
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
-
className: "sf-slate-article-container"
|
|
147
|
+
className: "sf-slate-article-container",
|
|
148
|
+
onWheel: handleWheel
|
|
145
149
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
146
150
|
className: "article"
|
|
147
151
|
}, /*#__PURE__*/_react.default.createElement(_extension.SetNodeToDecorations, null), /*#__PURE__*/_react.default.createElement(_slateReact.Editable, {
|