- last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago 8 pass, 8 fail
IEF Complex forms do the submission via AJAX call. But they don't do the scroll to the message area, to make the error messages visible to the user.
1. Open an entity edit form with some long IEF Complex form (with "Update" button), that doesn't fit vertically to the screen, with a required field at the top.
2. Keep the required field empty, submit the IEF Complex form.
It will reload, but will not be successfully submitted. And you even don't see the reason why, because the form were submitted via AJAX call and the error message appears at the top of the form. But the "Update" button is in the bottom of the form, so you don't see that something appears, and don't see the Error Message without scrolling up.
To solve this problem we need to check the availability of errors, and if they exist - scroll the page to the Error Message area.
We have an AJAX function ScrollTopCommand
that implements the scrolling, so can reuse it to implement the required behavior.
But the problem is that function is located in Views module, so now we need to include views/views.ajax
library to make it works, and it will not work if the Views module is not installed. But here
β¨
Move ScrollTopCommand views Ajax command to the Drupal Core
Fixed
is my proposal to move this useful function to Drupal core.
As for now, I've created a patch, that checks the availability of the views
module and if it is enabled - attaches library and implements the scrolling to the message area.
Postponed: needs info
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.