inline preSubmit return false cancel next field focus

inline preSubmit return false cancel next field focus

jfrjfr Posts: 71Questions: 24Answers: 0

Hi

In an inline editor, I have added a return false; in the preBubmit event because there was no change to submit .
The focus done with the tab is on the next field but the previous field will not close and the new focused field will not open.
Is there a way not to submit unchanged data and go on with next field processing
would be very practical with the inline editor

Thanks

Answers

  • allanallan Posts: 61,734Questions: 1Answers: 10,110 Site admin

    Returning false from preSubmit will cause the current submit to cancel and leave Editor in its current state. You shouldn't need to return false in preSubmit if there are no changes to have it not submit - Editor should do that automatically as is the case in this example.

    Allan

  • jfrjfr Posts: 71Questions: 24Answers: 0
    edited May 2017

    Hi Allan
    I am using editor 1.6.2

    I have found that
    a) A json number value is transform to chacarter 12.45 to "12.45"
    b) When using mask on a amout, the decimal is not easy to handle
    It goes from "12.45$" to "1245'
    Those 2 reason will make _deepCompare to deteck change

    I Have changed the json to return number has character
    and I'm not using mask where I have decimal

    Thanks

This discussion has been closed.