Chandusangale / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
1 stars 0 forks source link

Select On Key Press #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select the dropdown
2. Press any key
3.

What is the expected output? What do you see instead?
Suppose it is a dropdown of location and if I select 'U' it should take the 
focus to 'USA'.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by SunilKum...@gmail.com on 19 Apr 2010 at 1:11

GoogleCodeExporter commented 9 years ago

Original comment by womohun...@ittrium.com on 14 Sep 2010 at 2:26

GoogleCodeExporter commented 9 years ago
I have similar problem.  I just integrated this ddcl plug-in and liked how easy 
it is to use.  However, I need the additional ability to detect user's input 
(i.e. onkeyup) to navigate to the first option that matches the input pattern.  
This is a must since we may have hundred or even thousand of options in the 
dropdown.  However, I don't see that the current plug-in provides the API to do 
this.  Do you know of the solution with this plug-in?

Original comment by TedM...@gmail.com on 19 Feb 2011 at 12:46

GoogleCodeExporter commented 9 years ago
We are in the same exact position.  We have developed with the ddcl plug-in and 
love it.  But once up on our preview servers we realized very quickly based on 
user feedback that this won't work for us without the additional ability to 
detect user's input (i.e. onkeyup) to navigate to the first option that matches 
the input pattern.

Has anyone had any luck overcoming this?

Original comment by getsnapp...@gmail.com on 3 May 2011 at 11:12

GoogleCodeExporter commented 9 years ago
This issue is troubling us pretty badly. We have ddcl plug-in in production and 
this is one of the biggest problems our users are reporting.

Original comment by Josef.S...@gmail.com on 4 May 2011 at 8:47

GoogleCodeExporter commented 9 years ago
If anyone has looked into this issue I'd be interested to hear where they got 
stuck.  Here are the issues I'm having making it work so far:
1. With the dropdown checklist opened one of the checkboxes will have focus so 
the keypress event isn't firing. Being able to use a keypress event would be 
perfect but it doesn't seem possible.  
2. Triggering on the keyup like the _handleKeyboard function gives the keyCodes 
but translating that into text useful for performing the search appears 
daunting across languages and browsers.

It seems like the most reasonable technical way would be keypress triggers in 
an input element but that seriously messes with how it currently works.  

Original comment by bno...@gmail.com on 6 May 2011 at 6:21

GoogleCodeExporter commented 9 years ago
I am working on a fix for this. I have some semi operable code in the midst. 
I'll let you know when I have some usable and I'll send it your way.

Original comment by ebor...@unionstmedia.com on 29 Mar 2012 at 9:01

GoogleCodeExporter commented 9 years ago
I have attached the appropriate js to patch this issue. Substitute the 
following for the _handleKeyboard method.

Original comment by ebor...@unionstmedia.com on 30 Mar 2012 at 5:37

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you ebor...@unionstmedia.com for your patch. It's extremely useful. 

I did make a small change to your _getItem function. I needed to search the 
text displayed next to the checkbox, not the value (which was different in my 
case).

So I made this simple change in _getItem:

       var val = $(this.nextSibling).text(); //$(this).attr('value');

The text is inside the label element next to the checkbox, so the above gets 
and searches the text.

Thanks again.

Original comment by razisye...@gmail.com on 27 Mar 2014 at 3:28