How can I disable tab change action in tabset for UP & Down arrow keys ?

  • 1
  • Question
  • Updated 2 years ago
  • In Progress
  • (Edited)
Hi, I want to disable tab change action in tabset.

If the user clicks on down/up arrow key user will navigate from one Tab to another within a TabSet. I want to disable this action. It should enable only for left/right arrows.

Please let me know how can i make it possible ?
Photo of Vijayakrishna

Vijayakrishna

  • 642 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Khamla Phimmachack

Khamla Phimmachack, Official Rep

  • 1,536 Points 1k badge 2x thumb
Sorry Vijayakrishna,

There currently is no declarative way to set keyboard behaviors in a tab set in Skuid's page builder. You would have to include some custom Javascript to accomplish this.
Photo of Vijayakrishna

Vijayakrishna

  • 642 Points 500 badge 2x thumb
thanks for quick response.

I tried with following jquery code in snippet and loading snippet on tab load action, but couldn't resolve. Any suggestions ?

It disabled the keyboard events, but tab content not rendering completely.

$('#mytabpanelid').tabs({
activate: function(e, ui) {
e.currentTarget.blur();
}
});

Even tried the below one also, but no use :

$('.classtabanchor').keydown(function (event) {
 if (event.keyCode !== 38 && event.keyCode !== 40) {
            return false;
        } 
});
(Edited)