This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Steve Ruiz
Posted Apr 23 - Read on Facebook

Events.Click has been bugging me for a while, as it fires on mouseup events even if the preceding mousedown event occurred somewhere else. This means a lot of false clicks, such as when a user 'cancels' a click by moving the mouse off of the clickable layer (and onto another), or when a drag ends over an area with an onClick listener.

Gesture events take this into account and know to cancel when a gesture's end event occurs on a different layer than its start event. This makes Events.Tap an excellent replacement for Events.Click, however I'd like to see the same functionality extended to Events.Click.

4 Comments

Koen Bok

So we deliberately don't do smart things with real browser events, only with gesture events, as a principle. That way you can choose between automagic stuff and raw events.

Steve Ruiz

Thanks for the reply Koen. I follow, but then why not use the click browser event for Events.Click, rather than the touchEnd / mouseup events? Browser issue?

Jordan Robert Dobson

That way it works on both mobile and desktop.

Koen Bok

Meta: always fun how I think we stayed true to some principle only to discover that we totally threw that out of the window for one edge case. Aaaah product design... ;-)

Read the entire post on Facebook