Skip to main content

Hi Figma team,


i think i spotted a bug, i’m attaching a file :

Figma – 2 Oct 24

the layer “test-group” is a group and nodenode.type returns FRAME for this.

It’s quite random, by playing around and toggling between FRAME and GROUP, i’ve seen the bug disapear then reappear, hopefully, you can reproduce it.


I couldn’t find my Figma version (i’m using the desktop version on windows),

i think it’s fairly recent, i remember updating about 2 weeks ago,

let me know how to find it if you need the precise version number.


Best

In case this cannot be solved,

i’d like to know if there is another way for me to know if a node is a frame or a group.


the reason I need to differenciate them is because of the special behaviour of group where a group’s children’s coordinates aren’t substracted from their (group) parent’s position.


Any work-around that let me know this info reliably would be welcome.

Thanks


Hi,


any update on this ?


i’m still regularly observing this issue,

it’s a real problem, i can’t determine reliably the coordinates of my nodes because of that.


Best


ok, i think i finally understood what’s happening,


the api returns the wrong type (FRAME or NODE) only when the type is changed (manually in the Figma UI) and the plugin isn’t restarted. It’s like there is a cache that returns the same node.type as the first time.


it’s not as much a critical issue as i thought, but still a bit,

The scenario where this will be an issue is when a Figma user uses an HTML/CSS exporter (like the one i’m building) and switch some nodes from FRAME to GROUP (or the reverse) while using the plugin.


I hope this helps. Cheers



This is a documented edge case GroupNode | Plugin API


I see, thanks.


And is there no way to refresh that node to get updated information ?


(I assume not otherwise it would be mentioned in that doc but asking just in case)


Not that I know of .


Reply