lexical-ios icon indicating copy to clipboard operation
lexical-ios copied to clipboard

Misalignment of DecoratorNode due to Insertion of ElementNode or Additional DecoratorNode

Open JaminZhou opened this issue 1 year ago • 2 comments

I've noticed an issue regarding the layout misplacement of DecoratorNode when an ElementNode or another DecoratorNode is inserted before it. Upon debugging, I found out that the misalignment is caused by the system not marking the problematic DecoratorNode as 'dirty', which results in the layout not being recalibrated or updated. As such, I propose a fix that would include the marking of the DecoratorNode as 'dirty' to trigger a layout update whenever a new node is inserted. This should correct the alignment issue and ensure the layout is correctly adjusted for the new node.

https://github.com/facebook/lexical-ios/assets/9011374/ee1cd6e9-8428-4076-857d-8a842749ab43

https://github.com/facebook/lexical-ios/assets/9011374/b83e70dd-b974-4c73-b123-81df0998a187

JaminZhou avatar Dec 18 '23 07:12 JaminZhou