Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ArgumentOutOfRangeException when richtextfield._textChanged is true #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pkujhd
Copy link

@pkujhd pkujhd commented Dec 10, 2024

修复 #241 这个issue所描述的问题

RichTextField/TextField在OnUpdate的时候触发了OnSizeChanged, 到上层需要BatchUpdate的节点执行SetRenderingOrder时,因为此时的_textChanged是true, 所以会在
Rect rect = child.GetBounds(initiator);
时触发EnsureSizeCorrect(),将所有的同级节点都移除,导致

        int count = _children.Count;
        for (int i = 0; i < count; i++)

count发生了变化,但是这里的值时旧的,会 throw OutOfRange Exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant