I can’t figure out with NextJs/React how to prevent click event when UIs are layered.
But I am sure it’s doable.
Here is the working example:
This is a UI from Vercel and I believe it’s made of NextJs.
- When
...
is clicked button => show a floating menu UI - When
#89
is clicked redirect to my github page - When background (anywhere in the box UI) is clicked => redirect to my app
In my case, I’d like to prevent 3 while 1 or 2 is clicked. The Vercel website is the perfect example.
I thought I can solve by e.preventdefault()
or anything prevent event capturing & bubbling but it doesn’t work.
Does anyone knows the Vercel github (is this public?) or how to solve this with NextJs/React?