Review main Abandoned

41703[BUGFIX] checkSubmit should wait until validation has finished

Marco Huber CR 0 V 0 Easy +18 −16 updated 10/26/15, 16:01

Commit message

Because of some setTimeouts in FormEngineValidation.validate()
the TBE_EDITOR.checkSubmit() function has to wait, too.

Review

  • Code review CR 0
  • Verified V 0

Files 1

Review log 8

  1. Marco Huber uploaded patch set 1 07/19/15, 11:03

  2. Benni Mack voted on patch set 1 CR +1 V +1 08/06/15, 13:36

  3. Frank Nägler commented on patch set 1 CR -1 08/06/15, 14:00

    temporary -1, need check the behavior.
  4. Frank Nägler commented on patch set 1 08/06/15, 14:54

    so now finally: this patch change the behavior of the method. The logic must not change, please wrap the code in a setTimeout and not call submitForm. The method will wait the 500 ms and then return true/false like before.
  5. Benni Mack voted on patch set 1 CR 0 V -1 08/13/15, 05:35

  6. Daniel Goerz commented on patch set 1 08/23/15, 11:18

    Am I right, that this is a duplicate of the already merged https://review.typo3.org/#/c/42075/? If this is the case, can we abandon this to reduce the overall number of open reviews?
  7. Marco Huber commented on patch set 1 08/26/15, 12:00

    @Frank: If I wrap the whole function in a setTimeout, then the default event handling is used and the form again gets submitted without validation. We have to return false immediately and then call the submit manually. I don't see another way to wait 500ms before the form gets submitted. @Daniel: Yes, for now the symptoms of the problem are solved. But only because every field is validated immediatly when it changes. The real problems are the 500ms timeouts in FormEngineValidation.validate() and that the form doesn't wait the 500ms until the validation is finished befor it gets submitted. Think of a custom field which doesn't get validated on change: it won't get validated when the form is submitted. I have no problem with closing this issue, if this case is to generic/abstract or not relevant. :-)
  8. Frank Nägler abandoned the change 10/26/15, 16:01

    Since we will change the validation stuff in CMS8 and Marco give us the OK to abandon this patch, I will do this now.