actionscript 3 - Preventing default arrow key behavior when a UIComponent is focused? -


i'm trying creating text-input-like real-time tokenizer consists of block (shape/visual) components (extended uicomponent) , dummy textinputs, ordered in hgroup component.

i.e. typing expression "x+5" this:

["x" block][textinput]["+" block][textinput]["5" block"][textinput] <- cursor here

logically want pressing left or right arrow keys moves focus between block , textinputs.

i overrode keydownhandlers this, doesn't focus correctly. when i'm focused in block component, pressing left , right moves correct textinput, when moving textinput block focuses other unrelated component in parent application.

i tried using trace() statements, , seems focus being set twice, this:

1) if textinput focused initially, focus goes correctly block component on side, goes unrelated component.

2) if block focused initially, focus goes unrelated component, focuses on right textinput.

preventdefault() , stopimmediatepropagation() did not seem stop focus going unrelated component.

any appreciated. thanks!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -