As mentioned in another thread, I created a custom list extending
listbox_base.
To go further away from that I also just created my completely own
list control with list items and so on (copying listbox.xml and
altering it to my needs).
Anyway, both ways lead to the same problem: my list control can never
receive focus and thus keypress events won't work.
I already checked the following website:
https://wiki.mozilla.org/XUL:Focus_Behaviour
but I didn't find a reason there for not getting focus.
To solve my problem, I may need to know, how focusing XUL elements
works in general. How does an element receive focus when i click on
it?
May my problem be, that I don't provide my own nsIAccessibleProvider
for my control? (Didn't look into accessibility yet).
I am thankful for every hint!
Likely you haven't made the element focusable. Controls should implement
nsIDOMXULControlElement and you should have -moz-user-focus: normal set.
Thanks! I did the first, but forgot the second. I kinda had the stupid
assumption, that "normal" was default. *boing*
Thank you a lot! :)