Inline edit of field not being submitted to the server
Inline edit of field not being submitted to the server
I have a data table where I show, depending on user, a list of projects where they register hours spent, one row for each project.
Editor is defined and I am using inline editing.
Intermittently (I wish it was every time, but only in 10% of the cases) the first field being changed does not trigger a submit and it seems as it does not understand that a change has been made to the field.
The format is numeric with two decimals and when the error occurs, the value is also not refreshing the format of what has been entered, if 2 is entered it should be displayed as 2,00 when leaving the field but this does not occur.
Is this a behavior, that first edit fails, that has been noticed any time earlier?
Debugger information: emufoz
I can PM a link to a page for test purposes if asked for it, but the page is in Swedish....
KR,
Bjørn Hasselberg
This question has an accepted answers - jump to answer
Answers
Nothing?
We've not seen this problem before. In the 10% of times when it doesn't work, do you see any network traffic to/from the server when the field is submitted? You'll see that on the network tab of the browser's developer tools. That would be the place to start - to see if anything is sent, and if so, what the server replied with (such as an error, perhaps),
Colin
Hi Colin,
No there is no network traffic being initiated, nor does it trigger any of event (I am listening for "initSubmit").
The next time the field is entered it works fine.
KR;
Björn H
Maybe also worth mentioning that the behavior is happening over Mac/PC, Edge/Chrome/Firefox/Safari/Brave
Hi Bjørn,
If you could PM me the link and instructions on how to reproduce the behaviour, I'll take a look at it.
Thanks,
Allan
PM sent
The problem is connected with the fact that it is possible to enter an input text without trigger the "click" event.
If you do a "mouseDown" in the cell and then move the cursor to mark the content but do the "mouseUp" outside of the current row, the cell "click" event is not triggered.
However, you are positioned in the text field and can modify the data.
The examples I have seen on inline editing, use the "click" event as trigger for the editor.
In this case the editor is not activated, and thus no data is saved to the server when leaving the cell.
My solution is to also listen to "select" events.
So, I now have this to trigger editing
and this seems to solve my problem.