Get cell entered/edited state

Tags: #<Tag:0x00007f45354bd0d0>

Dear All,

My question is - is there a way to determine if a cell is entered / edited? By that I mean - I want to know if the user has entered a specific cell (and the input cursor has appeared in the cell).

I hope I’m not being too vague with my question, so I’ll give a bit more context - I’m creating custom behaviour with the keypress events, using the beforeKeyDown hook and I want them to apply, only when a cell is not entered. I.E. if I use arrow keys inside a cell - everything should navigate as intended, but if we have a cell only selected and press arrow keys, different behavior is applied.

Example of what I mean by entered (you can see the input line):
Screenshot%20from%202021-09-15%2018-51-34

Hi @alexander.bozhkov

so as I assume you want to track when the cell is in an edit mode when the key is pressed.
If so, you can use getActiveEditor method like in this demo https://jsfiddle.net/pqywdb3r/2/ where the setDataAtCell is held till the user closes the cell editor.

Thanks a lot :slight_smile:
spreadsheet.getActiveEditor()._opened worked like a charm for what I wanted to do.
(we can close the ticket)

Great! I keep my fingers crossed for further development :slight_smile: