Enter op 'submit' button
Enter op 'submit' button
RagnarGrootKoerkamp
Posts: 48Questions: 14Answers: 1
in Editor
When I tab through the form until the focus is on the submit
button and then press enter, an error is raised:
dataTables.editor.js:4941 Uncaught TypeError: Cannot read property 'canReturnSubmit' of null
at HTMLDocument.<anonymous> (dataTables.editor.js:4941)
at HTMLDocument.dispatch (jquery.js:3)
at HTMLDocument.r.handle (jquery.js:3)
I'm not sure any functionality is lost, but I think the relevant function should check whether field
is valid.
This discussion has been closed.
Answers
Not sure if this is the error I'm thinking of but is that column excluded from the inline editor columns in your event listener?
Kevin
Yes, this is a bug in Editor 1.6.1 I'm afraid. I'm wrapping up 1.6.2 at the moment which contains a fix for this. It will be released soon.
As you say, there is no functionality lost at the moment, but there is that big ugly error.
Allan
Hi Allan,
This still appears to be a bug in Editor version 1.8.1.
Also, the configured onReturn action doesn't appear to be triggered when return is pressed on the Submit button, only when it is pressed on fields - is that intentional?
Unfortunately this issue made a bit of a come back in 1.8.1 for certain conditions. The way to address it is to add a
canReturnSubmit
function to whatever field's plug-in is causing this. I've added extra guarding which will be in 1.8.2.Yes. It would only trigger on the fields, not the buttons. If you want to run code on activation of a button you'd need to use the
buttons()
method to specify the buttons and their actions. Or if the default actions are okay for you, then use one of the event handlers such asinitSubmit
.Allan