fix: rsbuild related error fixes (#3655)

This commit is contained in:
lohit 2024-12-15 15:30:58 +05:30 committed by GitHub
parent 993424a2b8
commit 19ad0ecef7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,9 +93,6 @@ if (!SERVER_RENDERED) {
const box = target.getBoundingClientRect();
const hoverTime = getHoverTime(cm);
state.hoverTimeout = setTimeout(onHover, hoverTime);
const onMouseMove = function () {
clearTimeout(state.hoverTimeout);
state.hoverTimeout = setTimeout(onHover, hoverTime);
@ -115,6 +112,9 @@ if (!SERVER_RENDERED) {
onMouseHover(cm, box);
};
const hoverTime = getHoverTime(cm);
state.hoverTimeout = setTimeout(onHover, hoverTime);
CodeMirror.on(document, 'mousemove', onMouseMove);
CodeMirror.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
}