I am extracting one specific issue from Bug #2187633 --- Additional comment from Jeff Fearn đ on 2023-07-03 01:25:25 CEST --- (In reply to VĂt Ondruch from comment #5) > I am testing in the staging instance and while the behavior is probably > improved, I still struggle submitting the changes unexpectedly (and the > results might be visible in bug #1995819). The reproducer should be: > > 1) Start typing a comment by `@` character > 2) The focus is moved into the search box > 3) Start to type `pval` (I hope that my colleague Pavel Valena would be > forgiving, should this result in some needinfos for him ;)) > 4) Press `Enter` > > IMHO, the `Enter` in the search box cannot submit the changes of the ticket > no matter what. It looks like if you use that widget, anywhere, such as CC, and you hit enter without selecting an entry in the drop down then it submits the form. This is actually correct from accessibility standards perspective, but it sucks. We would need to change how the text box works for this use case, but do so in a way that doesn't break accessibility. i.e. we will need to work out how to make it non-standard and communicate that to browsers in accessibility mode, readers, etc. In the meantime if you decide you don't want to select a user, then use the escape key to exit the widget.
(In reply to VĂt Ondruch from comment #0) > It looks like if you use that widget, anywhere, such as CC, and you hit > enter without selecting an entry in the drop down then it submits the form. > This is actually correct from accessibility standards perspective, but it > sucks. We would need to change how the text box works for this use case, but > do so in a way that doesn't break accessibility. Not sure if in the form has to be existing user but checking existence of valid user might be one precondition to consider what the Enter should do in that box. Also, I think it is kind of surprising that typing part of the user name does not preselect some of the listed users. > i.e. we will need to work out how to make it non-standard and communicate > that to browsers in accessibility mode, readers, etc. > > In the meantime if you decide you don't want to select a user, then use the > escape key to exit the widget. I don't think that my issue is with escaping the widget. But if I type "pval" looking for Pavel Valena, then some entry from the displayed list should be preselected and should handle the press of the Enter. But to have something selected, I would need to press an arrow first.
FYI for future me, the widget the user select is based on [1, the overrides in RHBZ [2]. 1: https://api.jqueryui.com/autocomplete/ 2: https://pagure.io/Red-Hat-Bugzilla/rh-bugzilla/blob/master/f/extensions/BayotBase/web/js/bayot.util.js#_971
On QA server. 1. Open an existing bug 2. In the new comment box start typing a user match When the user match pops-up the first entry is selected. 3. Press enter User is added to comment and needinfo box. The form does not submit. 4. Remove the user data and start the user match again 5. When user match list pops up, press the up key and then the enter key The text you entered in to the text box is added to the comment. The form does not submit. 6. Remove the text and start the user match again 7. When user match list pops up, press the escape key. The user select closes, the comment box is not updated. The form does not submit. 8. Add a needinfo and submit the form. The user is needinfo'd
This fix has been deployed to stage Bugzilla for a short public testing phase. https://bugzilla.stage.redhat.com
This change is now live. If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug.