[ 1 post ]

Naoya Makino

  • Username: naoyamakino
  • Joined: Wed Oct 19, 2011 10:35 am
  • Posts: 2
  • GitHub: naoyamakino
  • Gists: naoyamakino
  • IRC: naoyamakino
  • Offline
  • Profile

How to customize keyboard listener of AutoComplete

Post Posted: Wed Oct 19, 2011 10:54 am
+0-
Hi all,

We've customized the HTML of the search autocompleter, so the keyboard listener that YUI uses for keyboard navigation is looking for HTML elements it can't find.

e.g., press down arrow => highlight next item in list, press up arrow => highlight previous item in list

I have considered formatResult, but as far as I know, that only allows me to format individual entries, while we are looking to set the entire HTML structure. This is to enable the styling of the results, and as I understand it, we are likely interested in customizing the HTML structure further.

I think it is likely that I'll have to customize the keyboard listener to get around this issue.

Is there any way I can customize the keyboard listener of autocomplete so that it detects the customized html elements and enable yui-ac-highlight next/previous elements?

Here is my code:

search_autocompleter.js

Click here to see the revision history on this Gist.

thank you so much for your feedback.
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum