Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Once the results pop up beneath the text box, users should be able to hit the down arrow (and up arrow) to scroll through the options. Once they pick the one they want, they should be able to hit enter to submit the selected one.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2919102-3--highlight_options_after_arrow_key_selection.patch | 715 bytes | drunken monkey |
Comments
Comment #2
sagesolutions CreditAttribution: sagesolutions commentedOK under further review, the user can use the arrows to select the option. However, the UI doesn't show any sort of selected state on the items, so the user has no idea which item they are currently selecting.
Comment #3
drunken monkeyThanks for reporting this problem. #2906450: Fix markup/CSS for autocomplete suggestions doesn't seem to have fixed this, I can still reproduce the buggy behavior. It seems to be a by-product of our nested element structure for the suggestion.
The attached patch is my attempt to fix this. However, at least in my Firefox (56.0.2), when moving the mouse over the options list, all hovered options will be highlighted and remain highlighted. Only selecting with the arrow keys works correctly.
Curiously, it seems like this might be a bug in Firefox, not a problem with our or the jQuery UI Autocomplete widget's code – from the class structure and CSS, the rules shouldn't actually match anymore, and Firefox even shows them greyed out (i.e., "not matching") in the "Inspector" tab. However, it still applied the definitions, as if it hadn't noticed the change in classes. See attached screenshot.
(To be able to test more easily, I replaced the minified autocomplete Javascript with the original and then replaced
close()
and_close()
with no-op functions for testing – which makes the menu stay open when switching to the Firefox Web Dev Tools.)Would be great if someone with more frontend skills than me could take a look.
Comment #4
drunken monkeyComment #5
ressa CreditAttribution: ressa at Ardea commentedFirefox 56 seems to be the only browser where it doesn't work ... I just tested with these locally and on Browserwatch, and it works in Firefox 57, which will be released on 14. November 2017:
Works fine
Doesn't work
Comment #6
drunken monkeyAh, OK, that's great to hear!
Then I'd say we just close this issue? Doesn't seem worth the trouble of coming up with a solution that works with Firefox, too, if they're gonna fix that anyways.
Thanks a lot for your tests!
@ sagesolutions: Can you confirm that you're using Firefox?
Comment #7
sagesolutions CreditAttribution: sagesolutions commented@drunken monkey, yes I was using Firefox for testing
Comment #9
ressa CreditAttribution: ressa at Ardea commentedI think the patch in #3 might still be needed. I just tested with various browsers and OS'es, and without the patch I am not getting the highlight ...
Good for 23 hours:
Modules:
Comment #10
drunken monkeyAh, you're right of course, thanks a lot for reminding me!
The Firefox problems I described just prevented the patch from working, but our CSS was broken without it regardless. So, committed the patch.
Thanks again for your input here, everyone!
Comment #11
ressa CreditAttribution: ressa at Ardea commentedAwesome, arrow keys highlighting now works, thanks for committing!
I do need to change
Suggester plugin
fromDisplay live results
toRetrieve from server
, when using the Database Search Defaults module to get suggestions, but that's another issue.Comment #12
ressa CreditAttribution: ressa at Ardea commentedI see that a 1.0 stable release is very close.
Would it be worth considering including this patch for the stable release?
Comment #13
drunken monkeyAll patches committed until the stable release is created will be included, so this, too.
However, due to #2912246: Autocomplete/autosuggestions are not language-context sensitive, I'll probably create a second release candidate first (after that issue is resolved, too).
Comment #14
ressa CreditAttribution: ressa at Ardea commentedSounds great, thanks!