Key-focus event

Key-focus event

RagnarGrootKoerkampRagnarGrootKoerkamp Posts: 48Questions: 14Answers: 1
edited July 2016 in KeyTable

The key-focus page states that it will also be fired when a cell is clicked. The editor inline editing example with tabbing to the next cell has two event handlers, for both the key-focus and click events. My local tests show that the click event can be omitted, because the key-focus event will fire anyway. This raises two questions:

  1. Why is the click event handler not omitted?
  2. How does keytable deal with the :not(:first-child) specifier? (All 'special' columns like an 'edit' button and row-reorder keys do not fire this event.)

Edit:

The second question just answered itself: I was using a .editable class on inline-editable cells in the keys.columns option. Apperently, this uses the editable class of the column, not of the individual cells.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Answer ✓

    Why is the click event handler not omitted?

    Good question. Its due to the discussion in this thread. Basically if the cell had focus already, and then you clicked it, then the key-focus event wouldn't be triggered (since it doesn't gain focus - it already has it).

    Allan

This discussion has been closed.