When a table cell receives focus it resets an Action button’s timeSincePress.
But… why should it?
This behaviour gets posted about at least once a week here - and undoubtedly numerous times more for others who don’t post about it - that I think this needs some discussion.
And while i disagree with the behaviour in general I finally sat down to think about why this behaviour might have been baked in, in the first place. After thinking it over… I just couldn’t come up with a single use-case for this behaviour.
Good question. Can you share where this is coming up? For a button right underneath a table, the thinking is that it should behave a lot like a submit button on a math input. Enter on the last cell submits, focus in the table unsubmits. If there are cases that you don’t want this, would love to see them!
But it has come up a lot as a common pain point, almost always due to unwanted interference in animations. Just search on this board for terms like table, reset, focus, etc. to get a sense of the scope of the frustration people have experience over this.
Yes- that was a great workaround when using a graph…
but I still need an actual button (to hide objects and such) with a table on it too. @eli_desmos any updates here?
I’m also finding the table-button relationship to be problematic for two reasons:
In most of my activities I have some slides where I use a button to randomly generate numbers to give students unique problems and provide “infinite practice.” If there’s a table on the slide and a student enters values and hits enter to move to the next row then when they get to the last cell and hit enter the reset button gets triggered and they get a new problem for which all of the values they just entered are now wrong. If the button was right underneath the table then I get how one could want enter on the last cell to activate the button (like a submit button), but it causes me problems when my reset button is nowhere near the table and yet hitting enter on the last cell triggers the button no matter where it’s located (above, below, different column, etc.).
Animations. Sometimes I use a button to trigger animations using timeSincePress but when students click in a table to enter values that may have just been revealed to them through the animation, the animation gets reset. I found a workaround here but I’d rather the table just not affect the button unless I deliberately make it so using resetOnChange.