Page MenuHomePhabricator

Submit button click does not submit when validation is not finished
Closed, ResolvedPublic1 Estimated Story Points

Description

When clicking the submit button of the membership application form while the IBAN field still has the focus, only the validation of the form field is triggered. As already briefly discussed, the submit button click should be registered and processed after validation finishes successfully.

As proposed in the comment below, we are reserving space for the BIC and bank name that are returned and displayed after a successful validation. The UI should slightly change to reduce the height of the area that needs to be reserved for this.

Acceptance Criteria

  • The BIC field is removed.
  • The bank name line that is displayed when the validation was successful is changed to also contain the BIC (e. g. Bank Name (BIC12345)).
  • If a IBAN validates successfully, but doesn't return the BIC and bank name, Die BIC wird nicht benötigt. is displayed.
  • The spacing between the bank data input fields and the bank name/BIC line is reduced (see Style Guide).

Screenshots

IBAN

screenshot-spenden.wikimedia.de-2021.02.16-14_46_01.png (162×664 px, 12 KB)

Account number and bank code

screenshot-spenden.wikimedia.de-2021.02.16-14_44_33.png (288×666 px, 17 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

We have investigated this and found a design issue: When the user clicks the submit button, the browser blurs the bank data field (triggering an onBlur event) before triggering the onClick event. In the sub-second time scale between the blur and the click event, the browser renders the BIC field, moving the buttons further down. This leads to the situation that the browser somehow 'loses' the click event because it's in an area that's redrawn. If we use visibility instead of display for the BIC field (reserving whitespace, but hiding the element) the error does not occur. However, this looks kind of ugly:

Screenshot_2021-01-12 Wenn jeder nur einen kleinen Beitrag leisten würde, wäre unsere Spendenkampagne in einer Stunde vorüb[...].png (641×725 px, 42 KB)
Screenshot_2021-01-12 Wenn jeder nur einen kleinen Beitrag leisten würde, wäre unsere Spendenkampagne in einer Stunde vorüb[...](1).png (651×733 px, 40 KB)

We probably need to involve UX to find a more elegant way to make the submit button stay in place.

The other solution to this would be to avoid the blur-triggered asynchronous validation of bank data and validate it on submit. Be aware however, that the user then would have to trigger the validation manually in order to convert old payment data or show the BIC. This would also affect the donation form where the background validation and showing of the BIC is fine.

kai.nissen removed the point value for this task.
kai.nissen set the point value for this task to 3.Mar 2 2021, 12:26 PM
kai.nissen changed the point value for this task from 3 to 5.
  • The reserved whitespace between the bank data component and the summary is too large.
  • Bulma is setting the height of the bank name line to 20 or 25 pixels depending on the visibility property, resulting in a little bump when changing this property.
kai.nissen changed the point value for this task from 5 to 2.Apr 12 2021, 10:36 AM
kai.nissen changed the point value for this task from 2 to 1.Apr 26 2021, 10:25 AM