jQuery UI Widgets Forums Angular jqxGrid, strange Tab key behaviour after editing cell

This topic contains 3 replies, has 2 voices, and was last updated by  Martin 1 year, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • MrBonkeyDollax
    Participant

    Hi,

    I’m experiencing some strange behaviour when tabbing through cells in a jqxGrid while editing.
    I’ve found that if I edit a cell and press tab it selects the next cell, perfectly normal.
    If you tab out of the last cell in a row it selects the first cell of the following row.
    However, pressing tab again, instead of selecting the next cell, drops focus from the grid.
    If you then tab through the other page elements back to the grid you can continue from where you left off.

    I’ve found that if I do not enter edit mode on any cells, the tabbing works perfectly fine.
    You can reproduce this here: https://stackblitz.com/edit/github-jcfvl1
    I would recommend opening the ‘Open in New Window’ feature.

    Is there some way I can override this behaviour?
    I’ve tried using handlekeyboardnavigation on my grid to control what the Tab key should do, however, I found that this function could not recognise the variables I declare in my component, meaning I have no way to reference my grid and control the cell to select.

    Thanks,


    Martin
    Participant

    Hello MrBonkeyDollax,

    Thank you for the feedback about this behavior!
    Actually, you can refer the grid in the handlekeyboardnavigation function for overriding the behavior.
    Here is an Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/


    MrBonkeyDollax
    Participant

    Hi Martin,

    Aha! My syntax was a little off it seems..
    My initial attempt at using handlekeyboardnavigation can be seen here https://stackblitz.com/edit/github-jcfvl1-dvradr

    I understand this is more of a TS question than of jQWidgets, so I understand if you do not have time to explain, but why do these two different syntax’s behave so differently?

    Thanks again.


    Martin
    Participant

    Hello MrBonkeyDollax,

    In the second example handlekeyboardnavigation in an arrow function so its this is the same of that of the component.
    You can read more about arrow functions and their score here.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.