Parabellum1905y / ufd

Automatically exported from code.google.com/p/ufd
GNU General Public License v2.0
0 stars 0 forks source link

Selection only works on key up event - does not work on key down event #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
(From oshedar@gmail.com via email) 

there is a bug in ufd list version 0.6. Selection only works on key up event - 
does not work on key down event

What steps will reproduce the problem?
1. open the drop down and then hold down the down arrow key
2. next item will not be selected
3. next item will be selected only when you release the key

What is the expected output? What do you see instead?
next item should be selected
it gets selected only when the key is released

have resolved the bug
simply replace line number 101 which has foll code
if(!isKeyUp==((key==keyCodes.TAB)&&(key==keyCodes.ENTER)))return;
with the foll
if(isKeyUp && ((key==keyCodes.TAB)||(key==keyCodes.ENTER)))return;

hoshi

Original issue reported on code.google.com by thetoolman on 15 May 2012 at 5:31

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
(From oshedar@gmail.com via email)

.. after I rectified the below  bug another bug was generated as a result of 
the change in code. the down and up arrow keys were skipping 1 row when 
scrolling. it was because code was being executed on both keyup and keydown 
events.

What steps will reproduce the problem?
1. open the drop down and then press the down arrow key
2. next item will be skipped and the 3rd item will be selected

What is the expected output? What do you see instead?
next item should be selected
next item is skipped and the 3rd item gets selected
have resolved the bug
simply replace line number 108 which has foll code
self.selectNext(false);
with the foll
if(isKeyDown) self.selectNext(false);

and  replace line number 117 which has foll code
self.selectPrev(false);
with the foll
if(isKeyDown) self.selectPrev(false);

enjoy
hoshi

Original comment by thetoolman on 4 Sep 2012 at 7:24