[haiku-bugs] [Haiku] #16137: kbd navigation fails with single item menu

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 26 May 2020 01:34:09 -0000

#16137: kbd navigation fails with single item menu
--------------------+-----------------------------
 Reporter:  donn    |       Owner:  nobody
     Type:  bug     |      Status:  new
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Kits    |     Version:  R1/Development
 Keywords:          |  Blocked By:
 Blocking:          |    Platform:  All
--------------------+-----------------------------
 PopUpMenu with 1 item can't be reached via up/down arrows.

 Looks to me like Menu::_NextItem() will always return 0 in this case,
 because while(--numItems) is wrapped around its logic, and that loop runs
 0 times.  I think that's the whole problem.

 If you'd like to see what this looks like, CharacterMap>Font>Noto Mono has
 a single item "Regular".  If you kbd-navigate to that, Regular will be
 selected already, but if there's a way to make that happen with PopUpMenu,
 I don't know what it is.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16137>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: