Page 1 of 3
Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 5:23 pm
by MrAlobar
Anyone encountered and solved this one - it must have been encountered before (which makes me think I am missing something really obvious !) ...
With a pop-up menu open, using the tab key highlights menu items sequentially - great.
But, the other items on the card are simultaneously highlighted (with traversal on of course)!
I've been using Livecode for a few years and usually code my own pop-up menus but today I wanted to do a fast build of a prototype - unfortunately I've got side-tracked on this problem.
I've tried several work-arounds - the obvious one is to turn off traversal for all other objects whilst the menu is open - a cumbersome and ugly solution though.
Or am I missing something ?
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 6:07 pm
by dunbarx
With a pop-up menu open, using the tab key highlights menu items sequentially - great.
But, the other items on the card are simultaneously highlighted (with traversal on of course)!
Huh? I don't see this, either with just the menuItems displayed raw, or with the cursor drawn down to one of them so that one menuItem is hilited. The tabKey does nothing.
I have a few other fields on the card. As long as the menuItem list is displayed, the tab key does not navigate from one field to another.
Craig Newman
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 6:26 pm
by MrAlobar
Hi Craig,
Mmm odd.
I've just created a clean stack and the behaviour is immediate - just a field and some buttons (traversal on) and a pop-up menu), no code.
Behaviour translates to the Windows standalone too.
Jay
.. stack attached
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 7:24 pm
by jmburnod
Hi Jay,
not sure I understand what you mean
I tried your stack (LC 9.01, OSX 10.13)
I can choose a menuitem with arrows keys up/down
Tabkey select fld 1 as expected but nothing more
Best regards
Jean-Marc
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 7:46 pm
by MrAlobar
Hi Jean-Marc,
If you click the pop-up menu so it drops, and then use the tab key to move up and down the menu, the objects on the card are also tabbed through - simultaneously.
I created a standalone and that behaves the same way.
The behaviour I expected (and would like) was for the tab key to navigate the objects on the card whilst the pop-up is closed, and to navigate the menu items of the pop-up whilst it is open, but cease navigation of the objects on the card, and to then revert on closing of the pop-up.
PS LiveCode 9.02 on Windows 10
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 8:03 pm
by dunbarx
Jay.
I opened your stack, clicked on the menu button and saw the menuItem list open. Pressing the tab key at that time did nothing, as it also did not in the test stack I made.
Your stack has only one field, so with the menu button in its normal state, tabbing simply gives that field focus, and tabbing again, since it is the only field, seems to do nothing, leaving focus in the field, though it probably just re-selects that same field again.
Did I do this in the same way you expected?
Craig
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 8:04 pm
by dunbarx
Jean-Marc makes a point.
We are talking about the TAB key, and not an arrow key, right?
Craig
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 8:35 pm
by MrAlobar
Yes TAB key.
On my system, I do this...
1. click the menu button, menu drops
2. press Tab Key, 1st item is highlighted, and field receives focus
3. press Tab Key, 2nd item is highlighted, and button 1 receives focus
4. press Tab Key, 3rd item is highlighted, and button 3 receives focus
5. press Tab Key, 4th item is highlighted, and button 2 receives focus
6. press Tab Key, 5th item is highlighted, and the pop-up menu button receives focus
7. press Tab Key, 1st item is highlighted, and field 1 receives focus
etc.
(The pattern repeats as there are five menu items and five objects, otherwise of course it would be out of step as it goes around again.)
It appears that the objects are receiving focus first and then the menu item, as the target of the return key is always the menu item (when menu is open).
I will attempt to make a video if it will help. I'm starting to wonder if I have something peculiar in my set-up - although whatever it might be is coding into the exe as the application behaves this way too.
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 9:07 pm
by MrAlobar
Jean-Marc..
Tabbing from the field should shift focus to the next object - i.e. button 1. Did you have traversal-on for the buttons in your stack ? It's not on by default. Without this the tab would simply highlight the field and not tab across the buttons.
My stack has traversal-on for the buttons as I am trying to give the user the ability to navigate by tab key (and execute by return key).
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 9:19 pm
by dunbarx
Jay.
I get none of that. Could be me, could be you. I am on a Mac, OS 10.13.4, LC v. 8.1.10.
Craig
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 9:56 pm
by MrAlobar
Thanks Craig.
I'm going to test it on some older versions of LC.
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 10:09 pm
by bogs
I'll get the popcorn and wait on the video

Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 11:04 pm
by MrAlobar
LC 8.1.10 Same result.
I made a video but it's too large to post here (800k).
I'll share it on OneDrive is you think it'll help.
I'm baffled as to why I'm getting this result and you guys aren't.
Anyway, I'll go back to making my own pop-up menus as I need to get the job done - shame to have to though.
Re: Pop-up Menu and Tab Key
Posted: Mon Mar 18, 2019 11:26 pm
by jmburnod
Jay
Did you have traversal-on for the buttons in your stack ?
Yes. I used your stack
Re: Pop-up Menu and Tab Key
Posted: Tue Mar 19, 2019 3:48 am
by dunbarx
Jean-Marc.
What do you suppose is going on with him? I have no theories. We both used his stack unchanged.
Some OS environmental difference?
Craig