Menu Button closes submenu when tapped on mobile
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
Describe the bug
When deployed to mobile, Image Menu Button & Menu Button close when a user interacts (via a tap) with the submenu.
To Reproduce
Steps to reproduce the behaviour:
- Open a menu button on a mobile device
- Tap on the submenu
Expected behavior
I expect the submenu to stay open when directly tapped. Instead it instantly closes, even when interacting with ui elements such as a button.
Additional context
I believe the direct cause of this problem is line 648 in menu. It currently uses pointer.hover_pos() instead pointer.interact_pos() which would should keep track of a previous touch input as per the documentation in PointerState
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with line 648 in menu.rs and compare its use of pointer.hover_pos() with pointer.interact_pos(), using the linked PointerState documentation for touch behavior. Reproduce the menu interaction on a mobile device; done means tapping or interacting with submenu UI elements leaves the submenu open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100