Way to disable 'tab' movement around screen? Tab to focus (not edit) datatable?

edited January 13 in Technical questions

I'm currently trying to make the 'tab' button function differently than normal for datatables (currently, clicking 'tab' opens the edit for the next cell when I need it to just 'focus' on the next cell)

With this, I followed this guide (except using the tab keyCode '9'):
https://forum.webix.com/discussion/4271/enter-hotkey-to-move-to-next-cell-in-datatable
My code:
https://snippet.webix.com/w96ns1fh

This does do exactly what I'm hoping, as if I focus on one cell and then hit tab, I focus on the next cell, great.
However, if I try to 'tab' more than once (i.e. 2 or 3 cells over), I can't because
the 'tab' starts acting as a tab around the screen instead of only for the datatable.

How can I prevent the tab around the screen? Or is there an easier way to enable the tab to 'focus' on a dtable cell instead of enter the edit

Tagged:

Comments

  • edited January 13

    Figured it out: You need to use the function 'e.preventDefault()' to stop the browser's default tab functionality and then use 'webix.UIManager.removeHotKey()' to disable the Webix default tab functionality:
    https://snippet.webix.com/yi069458
    Once you do that you can override tab do whatever you want on key press since the tab functionalities get disabled.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion