Forum: Rails Spinoffs (closed, excessive spam) autocomplete selection works only with mouse not with the keyboard

5e0ec46e31d50b85adb2d2e2da7d32a0?d=identicon&s=25 pawel (Guest)
on 2008-06-11 18:32
(Received via mailing list)
I use the Ajaxautocompleter <a href="http://www.eltern-fragen.de>on
this site</a> in a searchfield.
It works well with the mouse, but i can't  it use withthe keyboard.

What's wrong?
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2008-06-11 18:58
(Received via mailing list)
Not being a German speaker, I couldn't come up with any search terms
that yielded a hint list of more than one word. Can you offer a few
"canned" search terms that we could use to test this?

Walter
5e0ec46e31d50b85adb2d2e2da7d32a0?d=identicon&s=25 pawel (Guest)
on 2008-06-12 20:43
(Received via mailing list)
Hallo Walter,

you're right. The server script returns a list of single words. It's a
prototype ;-)
To use the autocompleter, you can type all words you'll find on this
sites, f.o.

"Bri" It returns Briefe (letter) and Brita (the name of a woman).
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2008-06-12 20:52
(Received via mailing list)
After I wrote this, I discovered a few bits that could generate a
longer list. One thing I noticed was that there wasn't any difference
(style-wise) between the selected list element and the other list
elements. So it was possible to navigate the list using the arrow
keys, but you couldn't tell it was working.

I recommend that you strip back the style on this hint list to
exactly the CSS code that's in the Scriptaculous Wiki. Use a really
restrictive ID selector to reset everything to just that. Never mind
that it doesn't match the rest of your layout! But try it with the
"standard" CSS. Then see if you still have the problem. If not, then
the problem is in your CSS, not the script.

I've used this system a lot over the years, and it works well in most
cases. When I find that it doesn't, the problem is usually down to my
markup or CSS.

Walter
5e0ec46e31d50b85adb2d2e2da7d32a0?d=identicon&s=25 pawel (Guest)
on 2008-06-13 20:27
(Received via mailing list)
You're right, it was the style. I never thought this.

.autocomplete ul li.selected {

If there no rule for selected, i can't it select it with the mouse but
not with the keyboard.

Thank you.
This topic is locked and can not be replied to.