Skip to main content
Question

Bug setting reaction on mouse_enter not updating the trigger value

  • November 29, 2023
  • 5 replies
  • 288 views

Hi I am developing a plugin for Figma to convert whole design to website.
As I was doing the final tests I noticed that when the reaction’s trigger is on mouse_enter, the trigger property of the reaction object is set to an empty object.

You can check this by opening the console and create 2 rectangles with reaction set on mouse_enter and then type in console
Figma.currentPage.selection[0].reactions[0].trigger
and it shows empty object.
Try to change it different trigger then every thing is ok.
This bug is only happening on mouse_enter and mouse_leave
Other triggers working as expected so I think it is a bug
When I show(run) this in Figma it working correctly. if you know how Figma fetches this trigger, let me know please

This topic has been closed for replies.

5 replies

y_toku
Figmate
  • Community Support
  • 2545 replies
  • November 30, 2023

Hi there,

Thanks for flagging. I will look into this with the internal team and will get back to you when I have any updates. Thanks again.

Toku


  • Author
  • 2 replies
  • November 30, 2023

Thank you for your prompt response and attention to the reported issue.

After some investigation, I’ve noticed that Figma attempts to set the entire reactions array at once. During this process, it appears there’s a validation step for triggers, and in this validation function, it seems to lack the MOUSE_ENTER and MOUSE_LEAVE types.

I hope this information proves valuable to your internal team for a swift resolution. Your dedication to addressing concerns is greatly appreciated.


jefflee
Figmate
  • Figmate
  • 24 replies
  • November 30, 2023

We’re having trouble reproducing this. Could you provide either the code or set of steps you’re following to create the reactions?


  • Author
  • 2 replies
  • December 1, 2023

Yeah sure.

To reproduce the bug, follow these steps:

  1. Create two frames.
  2. Add a navigate reaction from one frame to another with the trigger ‘mouse enter.’
  3. Select the frame with the reaction.
  4. Open the console and type figma.currentPage.selection[0].reactions to log its reactions (there will be only one reaction).
  5. Check the ‘trigger’ property of the reaction object; you will observe that it is empty which shouldn’t be and is a bug.

You can view the bug in action by visiting the following Figma link:
figma file


jefflee
Figmate
  • Figmate
  • 24 replies
  • December 1, 2023

Thanks! I was able to repro, and will file an internal bug report.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings