-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Set autocomplete off on branches selector #15809
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
Set autocomplete off on branches selector #15809
Conversation
Fix go-gitea#15782 Signed-off-by: Andrew Thornton <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #15809 +/- ##
==========================================
+ Coverage 43.92% 44.00% +0.08%
==========================================
Files 681 681
Lines 82228 82228
==========================================
+ Hits 36120 36187 +67
+ Misses 40205 40133 -72
- Partials 5903 5908 +5
Continue to review full report at Codecov.
|
Hmm I think we rather want to prevent the element from getting autofocus, autocomplete may still be useful. |
This is precisely how fomantic's dropdown.js prevents this box from appearing. gitea/web_src/fomantic/build/semantic.js Lines 3806 to 3813 in d37a89e
|
IMHO, the dropdown is a custom implementation of autocomplete. Having both a custom implementation and the browser's is conflicting. On the compare/New Pull Request page, you can select a branch by using the arrow keys to navigate the dropdown. Unfortunately, the branch selector in this pull request uses a separate implementation and doesn't have the cursor movement functionality. But presumably, they'll get unified at some point. Anyway, for what it's worth, I think this is a good change. |
I can't seem to reproduce the original issue, whatever I do, it won't show any dropdown over the input. Tested in Firefox 89 and Chromium 90. |
For me, the browser's autocomplete shows in Firefox 88.0.1 if I click on the input, after it already has the focus. So the steps are: click the branch selector (the dropdown should open and the input should have the focus), then click the input. I don't know if there are other ways to trigger it. |
I can reliably reproduce the issue and my PR fixes the issue. |
Strange, doing that in Firefox 89 on Mac just brings up the browser-native dropdown menu with a input history, which I don't find too distracting. This behaviour might actually be platform-dependant. |
I could be mistaken, but I thought that's what this issue is. My browser input history is short, so it doesn't look like the issue screenshot, but if it were longer, I think it would be the same. I'm also running on mac. |
Yes that is the problem - it very much gets in the way, you can't get rid of it, it's inconsistent with the rest of the drop-downs and it's really quite unhelpful. |
It doesn't bother me really and it's very hard to accidentially trigger it but I guess it is the correct solution to hide it. |
Backport go-gitea#15809 Fix go-gitea#15782 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Backport #15809 Fix #15782 Signed-off-by: Andrew Thornton <[email protected]>
Fix go-gitea#15782 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Fix #15782
Signed-off-by: Andrew Thornton [email protected]