haxeui
haxeui copied to clipboard
[Feature] Tab between multiple TextInput
Being able to press <tab>
to switch between text inputs would be great. I tried implementing it myself, but couldn't find a way to do it...
Thanks,
Yes, this is certainly a needed feature.
See the above commit, I made some inline comments in Github.
I made 2 demos to see the difference:
Try to tab between TextInputs, it should work perfectly in the second one, even with TabViews. Then, try the Popup button with more TextInputs in it, that's where I have trouble. As you can see, if you tab between the Popup's inputs, you'll go behind the modal overlay to the underlying inputs. I'm not sure how to disable them when there is an overlay.
Right, but this will only work for flash, right? I dont think it will work for cpp/neko... i think proper way to do it is to create a FocusManager
this will only work for flash, right?
That's right. 'tabEnabled' doesn't seem to be implemented in openfl. I'll try to take some time to look into FocusManager
Well, its on my list defo... So i will get round to it... ideally it wouldnt be for just textinputs either... I think should should be able to tab focus through most/all haxeui components, but it needs some thought
As you can see, there is:
https://github.com/ianharrigan/haxeui/blob/master/src/haxe/ui/toolkit/core/FocusManager.hx
and
https://github.com/ianharrigan/haxeui/blob/master/src/haxe/ui/toolkit/core/interfaces/IFocusable.hx
But then dont do anything and are more there as a reminder really.
Alright then, that's great ! :)
Yeah, the FocusManager is definitively the proper way to do it, especially with multiple target.
Tab key would be great to use to jump around all inputs. Also, a "tab order" value on widgets would be valuable, like in HTML.
Yeah, agreed, its an important feature. It should also work for popups also... so a new FocusManager for each popup that goes back to the previous one when the popup is dismissed.