1

The following custom styling for drupal core's autocomplete dropdown works when hovering, but it is ignored when using the up/down arrow keys. (Currently, pressing the arrow keys only turns the text white.)

Does anybody know the secret to getting styles and keypresses working together?

#autocomplete li:hover, #autocomplete li:focus{ 
background-color:#428bca;
color:green;
}

1 Answer 1

0

This should work:

#autocomplete li.selected { 
  background-color:#428bca;
  color:green;
}

The items from the autocomplete list are having the .selected class added on hover/key navigation.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.