Open redstar08 opened 2 months ago
copy text and paste to Editor, type any link in overflow node, infinite loop (eg.[https://x.com])
useCharacterLimit autolink infinite loop bug type a link in overflow node http://x.
Lexical version: 0.17.1
Link to code example: https://playground.lexical.dev/?isCharLimit=true
infinite loop in useCharacterLimit -> $wrapOverflowedNodes
$wrapOverflowedNodes can deal autolink node or link node
Can I fix it by modify $wrapOverflowedNodes ?
see the comment below
import {$isAutoLinkNode, $isLinkNode} from '@lexical/link';
modify function $wrapOverflowedNodes
Judge by the $isAutoLinkNode and $isLinkNode to avoid infinite loop
Please refer to PR #6668 for discussion
copy text and paste to Editor, type any link in overflow node, infinite loop (eg.[https://x.com])
Lexical version: 0.17.1
Steps To Reproduce
Link to code example: https://playground.lexical.dev/?isCharLimit=true
The current behavior
infinite loop in useCharacterLimit -> $wrapOverflowedNodes
The expected behavior
$wrapOverflowedNodes can deal autolink node or link node
Impact of fix
Can I fix it by modify $wrapOverflowedNodes ?
see the comment below