Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu behavior bugs #253

Closed
nyanpasu64 opened this issue Sep 30, 2021 · 3 comments · Fixed by #255
Closed

Menu behavior bugs #253

nyanpasu64 opened this issue Sep 30, 2021 · 3 comments · Fixed by #255

Comments

@nyanpasu64
Copy link
Contributor

nyanpasu64 commented Sep 30, 2021

Child menus steal focus when opening

If you open a child menu, the child menu's first item is colored with focus even if the mouse isn't hovering it. When the mouse next moves, the child menu loses focus color. (If the mouse is moving quickly, the child menu flickers purple then white.)

Closing child menus causes parent to steal focus

When a child menu closes on a timer, it causes its parent to gain focus, and the menu item under the mouse to lose the focus color until your mouse next moves. If your mouse is moving, it shows up as a flash of white as the item loses focus and immediately gains it back.

Cannot close menus by clicking outside of window

See heading.

Cannot close menus by clicking on menu bar

See heading.

kas.menu.bugs.mp4

Also are the wgpu errors on startup known? I copied the logs to a gist (link).

@dhardy
Copy link
Collaborator

dhardy commented Sep 30, 2021

Child menus steal focus when opening

This is intentional for keyboard navigation but as you say, it shouldn't happen when using the mouse to open sub-menus.

Other menu behaviour bugs: agreed.

[2021-09-30T08:01:49Z ERROR wgpu_core::validation] Unexpected varying type: Array { base: [1], size: Constant([5]), stride: 4 }

Known, yes. It sounds similar to gfx-rs/wgpu#1427 but I didn't put much effort into investigating this.

@nyanpasu64
Copy link
Contributor Author

Honestly it's encouraging that you're considering behavior like tab navigation and keyboard-operated menus (and right-to-left/complex text layout) early on. They're aspects often neglected in mobile/embedded (touch-based) frameworks like SixtyFPS (Flutter?) or game-oriented UI frameworks like immediate-mode GUIs.

@dhardy
Copy link
Collaborator

dhardy commented Sep 30, 2021

I think KAS may have been the first Rust GUI with any significant keyboard navigation; it was a part of the design from quite early on (it may be a little easier with retained widgets). Touch support too, though that's still fairly limited (the Mandlebrot demo has two-finger rotation/pan/scaling and there's some attempt to make touch selection/panning work).

dhardy added a commit that referenced this issue Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants