Hello Figma Team,
I hope this message finds you well. I’d like to report a potential bug in Figma’s DocumentChange event. After some testing, it appears that this event is not triggered when changes are made to the indentation or list options of a text node.
Here’s a step-by-step guide to reproduce the issue:
- Start a Figma plugin.
- Attach an event handler to the DocumentChange event using the following code:
javascriptCopy code
figma.on('documentchange', console.log);
- Create a text node and select it.
- Change any property of the text node (e.g., text content, font size, color, etc.).
- Observe that the event handler logs a message, indicating that a document change has occurred.
- Now, select a portion of the text within the same text node and apply list formatting (e.g., turn it into a bulleted or numbered list).
- Notice that the event handler does not log any message, despite a document change occurring.
This behavior is inconsistent with how the DocumentChange event should work. Any change made to the document, whether it’s related to text content, styling, or formatting, should trigger the event.
This issue can be particularly problematic for plugin developers who rely on this event to capture and respond to changes in the document. It would be greatly appreciated if the Figma team could investigate and address this bug to ensure that the DocumentChange event functions as expected for all types of document modifications.
If others in the community have experienced this issue or have additional insights to share, please feel free to comment below. Your input is valuable in helping to identify and resolve this problem.
Thank you for your attention to this matter, and I look forward to seeing this bug resolved in future updates.