fkhadra / fkhadra/react-contexify

Safe triangle / delay before closing submenu

Open
#205 4 comments 0 reactions 0 assignees View on GitHub
candidate next release
Dominant language
TypeScript
Stars
1.2k
Forks
132
PR merge metrics
No merged PRs in 30d

Description

**Do you want to request a *feature* or report a *bug*?**
A feature

**What is the current behavior?**
When a submenu is opened it's at times hard to reach it since we need to go sideways with the cursor to avoid focusing the element below, which closes it.

![image](https://user-images.githubusercontent.com/996369/152305086-599aad3b-67df-4cea-a472-f1401086f59d.png)

This is easily demonstrated with the example code that ships with the project. Try going from "Submenu" to "Submenu Item 4" by doing a diagonal mouse movement.

See some background information here: https://height.app/blog/guide-to-build-context-menus

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:**

Use built in example in project.

**What is the expected behavior?**
The submenu have a delay before closing

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Not applicable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.