fix: merge bug (#6118)

* fix: merge bug

* fix: merge bug
This commit is contained in:
Katherine 2025-01-22 14:32:41 +08:00 committed by GitHub
parent 8243db5e3d
commit 778d98e038
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -171,7 +171,6 @@ function getSingleEndRange(nodes: ChildNode[], index: number, offset: number): [
let realIndex = 0;
let textOffset = 0;
for (let i = 0; i < index + 1; i++) {
// console.log(i, realIndex, textOffset);
if (nodes[i]?.nodeName === '#text') {
if (i !== index && nodes[i + 1] && nodes[i + 1]?.nodeName !== '#text') {
realIndex += 1;

View File

@ -12,10 +12,10 @@ import { css } from '@emotion/css';
import { useField, useFieldSchema } from '@formily/react';
import { Space } from 'antd';
import classNames from 'classnames';
//@ts-ignore
import React, {
createContext,
FC,
//@ts-ignore
startTransition,
useCallback,
useEffect,