Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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 comment
    10|10000 characters needed characters exceeded