Skip to Content
author's profile photo Former Member
Former Member

Navigating through Input fields via TAB

Hi all,

we are currently implementing a applications with multiple different input fields, like textareas, selects and checkboxes.

We now need to navigate through these Input fields using the TAB Key. I already googled how to achieve this using SAP UI5 and all i came across is setting the tabindex attribute via jQuery.

Is this really the only viable solution or does SAP UI5 provide such a functionality in itself and i only didn't find anything about it. (I already found JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.core.delegate.ItemNavigation, however this Navigation only seems to work with the Arrow Keys. Correct me if i'm wrong)

For the jQuery part i also tried this:

textArea.onAfterRendering = function(){
  $("#addField"+data.Sequence+"-inner").attr("tabindex", parseInt(data.Sequence)+2);

This code correctly adds the tabindex attribute with the correct value to all input fields. However navigation using TAB does not work, since the focus jumps over all different kinds of components, just not where i want it to go. As an added benefit the controller also can't access the value of the control anymore after i altered the tabindex attribute using this approach.

I'd appreciate any help you can give to solve this mistery or give me any helpfull hints.

kr Matthias

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 20, 2015 at 12:35 PM


    U need to use key code value 13, this is tab key event.

    If Jquery try $("#textinput").keydown(function(e) { e.keyCode; // this value });

    For auto tab: refer this link jQuery autotab examples

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.