Is it possible to restrict navigation between fields with tab key in editor window
Is it possible to restrict navigation between fields with tab key in editor window
Is it possible to restrict navigation between fields with tab key in editor window only to fields in editor window. When you tab to button (last control on editor window), and button receives focus, next tab moves focus to address line of browser window. It would be better when you press tab on button (last control) to move focus to first control on editor window?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Yes - the
keys.columns
option is the one you want to use here - that can be used to restrict which columns can receive focus.Regards,
Allan
Thank You Alan for Your response, but i think i didn't explain problem. Problem is that focus leaves editor window, and moves to ADDRESS LINE OF BROWSER WINDOW.
Looking forward to Your answer.
I see what you mean - thanks for the clarification. Currently no, there is no option to stop that focus. To be honest, I'm not actually even sure its possible in Javascript.
Allan
Maybe there is some way (when You tabbing between controls in Editor window), when you press Tab key on a last control, to force focus to first control?
Hope i do not bothering You.
Regards.
Capturing focus in a modal is relatively easy - you can just bind a
focus
event to the document and check if the element that the event was triggered on is in the modal or not. If not, focus on an element in the modal. Editor actually does this already.The trouble is that the address bar is not in the document and therefore won't fire a
focus
event in the document. You could listen forblur
, and if ever there is a blur and then not a focus, you could assume that the focus moved external to the document and trigger a focus action. That might be seriously annoying for an end user though!Allan
It is a solution.
The idea behind my queston is that I think when You are in modal window, you should "stay" in it, close it only by accepting or canceling the changes.
Immagine message box with "Yes", "No" and "Cancel" buttons, focus is on the "Yes" button, You press tab, focus go to "No" button, You press tab once more and focus go to "Cancel" button, You press tab once more and focus go address line (instead back to first control - "Yes" button).
Sorry for my bad english.
I consider my question answered.
Regards.
I agree - it should stay in the modal, but only within that document. If the user moves focus to another part of the browser - that is perfectly valid with the modal open.
Allan
p.s. Your English is excellent!