Fix that the reparented items outside mask clip rect still could be touched. #18039
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When reattaching the current node, the masks of all its descendants need to be recalculated since IMask caches the index which means the distance to Mask node.
Reported at https://forum.cocos.org/t/topic/163455/238?u=dumganhar
There are two relevant PR requests:
1. #8313
This PR could not fix the issue totally, there is a currMask cache which will be used for all current node's descendants, but descendants's IMask may have different 'index' value which indicates the distance to the Mask node.
2. #9363
This PR made _searchComponentsInParent as instance method but in 'reattach', it will always invoke '_searchComponentsInParent' for the current node.
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: