-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix input for groups validation in new user form #29968
Fix input for groups validation in new user form #29968
Conversation
/backport to stable23 |
/backport to stable22 |
011b747
to
dc4bb20
Compare
dc4bb20
to
3fe2b57
Compare
When I initially worked on this I had missed the existing but no longer applied CSS rules 🤦 With them it is possible to hide the hidden input. Note that in case of a validation error the hidden input will be the one focused, and then a click or a tab will be needed to focus the Multiselect component. However, although this is slightly inconsistent with how the other fields work after some testing I think that in this case it is better; if the input element inside the Multiselect component was the one focused instead (like in the original implementation of this pull request) the The width of the hidden field needs to be set to 0 to prevent it from getting the first click after a validation error in Firefox. The drawback is that, in Chromium, the message about having to complete the field is not based on the left position of the field like in Firefox, but on its width, so the alignment of the message is not the same as in other fields in the dialog :-( |
3fe2b57
to
8c828a2
Compare
/rebase |
The hidden input used for form validation was not actually hidden since Nextcloud 22, as the DOM structure changed to show a dialog rather than adding a row on top of the list when adding new users, so the CSS rules no longer matched. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Since Nextcloud 22 the "#new-user" rules had no effect, as the DOM structure changed to show a dialog rather than adding a row on top of the list when adding new users. Similarly, the z-index was no longer needed, as there will be no "new-user" row that could overlap. Moreover, the z-index was set even higher (100) in another rule still active. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
8c828a2
to
b7cbba0
Compare
Fixes #28992
Fixes #29063
The hidden input used for form validation was not actually hidden since Nextcloud 22, as the DOM structure changed to show a dialog rather than adding a row on top of the list when adding new users, so the CSS rules no longer matched.
Before:
After:
Last screenshot is slightly outdated, as the list of options is no longer shown behind the Please fill out this field message