KeyTable can cause stack overflow
KeyTable can cause stack overflow
KeyTable attempts to retain focus when a table is redrawn. This behavior breaks if the table contains 0 rows after the draw.
An example scenario that breaks:
* your table contains a single row
* your table is configured to call ajax.reload()
on a timer (every 10 secs)
* you select a cell using KeyTable
* someone else deletes the row that contains your selected cell
The next time the timer callback executes and the table is redrawn, KeyTable will go looking for the row and redraw the table like a mad man, eventually causing a stack overflow.
Replies
The offending lines of code are in this block:
This code results in a call to
that._focus
withrow
set to-1
causing a feedback loop in the following block: