Skip to main content
Question

Mouse interactions don't fire while mouse is held down


This topic is also addressed in this thread, but there were no responses to it.

In my scenario, if the mouse is being held down, the mouse leave event doesn’t fire. I’ve wired up a basic component that illustrates this- the orange box changes to red when mouse down fires, and the resulting red box should change to purple on mouse leave (or orange on mouse up). However, the box does not change to purple until I stop holding down my mouse. Here is the prototype and a video of the resulting interaction:

I’ve tested this type of interaction using raw JS in an empty webpage, and Figma does not behave in a consistent way: the mouseleave JS event still fires even while the mouse is held down.

I haven’t tried this with other Figma mouse interactions, but the OP of the thread I mentioned earlier seems to indicate that none of the mouse events properly fire while the mouse is held down. This is holding back my prototype and I can’t find any documentation that would indicate that this is the intended behavior.

This topic has been closed for replies.

6 replies

y_toku
Figmate
  • Community Support
  • 2526 replies
  • March 6, 2024

Hi there,

Thanks for reaching out. I’m checking with our internal team. I will get back to you when I have anything I can share with you.

Thanks for your patience.
Toku


mo_hamwi
  • Active Member
  • 49 replies
  • March 6, 2024

you should put the (mouse up) on the red not on the orange because the mouse being up on the red, the way you did it would work if you applying the interaction on the instance not inside the component. hope this help


  • Author
  • 4 replies
  • March 6, 2024

I apologize if there was any confusion- but I added the mouse up event solely for the demonstration, and it is not a part of the problem that I’m experiencing. If I delete that interaction, mouse leave still does not fire until I lift up my mouse.


y_toku
Figmate
  • Community Support
  • 2526 replies
  • March 7, 2024

Hey there,

It looks like this is an intended behavior at the moment, so I have to say it is a feature limitation. Our product team acknowledged your feedback and will consider for the future enhancements.

Thanks for your understanding.
Toku


mo_hamwi
  • Active Member
  • 49 replies
  • March 7, 2024

I see the problem now I think that what it is


  • Author
  • 4 replies
  • March 7, 2024

Thanks for the response. This outcome isn’t documented anywhere which made it difficult for me to understand why it wasn’t working when it appeared that I had prototyped the interaction correctly.


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