Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Key up on autocomplete listbox does not cycle. #230

pyjsorg opened this Issue · 1 comment

1 participant


What steps will reproduce the problem?

The problem can be demonstrated with the addonsgallery.
1. Click the AutoComplete link from the addonsgallery and enter some text in the "Enter a colour:" text box, eg "Br"
2. Press the down-arrow key repeatedly. The selected item moves down through the list and cycles back to the top.
3. Press the up-arrow key repeatedly. The selected item moves up the list, but doesn't cycle back to the bottom.

What is the expected output? What do you see instead?

Repeated presses of the up-arrow key should cycle through the list, returning to the bottom when it hits the top.

What version of Pyjamas are you using? which svn revision number?
On what operating system?

commit f3894ef
Author: Luke Leighton <>
Date: Mon Aug 30 16:39:36 2010 +0100

$ uname -a
Linux dtjimk 2.6.35-ARCH #1 SMP PREEMPT Sat Aug 14 20:57:39 UTC 2010 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux

Please provide any additional information below.

This patch appears to fix it.

@@ -64,8 +64,8 @@
if arg1 == KeyboardListener.KEY_UP:
selectedIndex = self.choices.getSelectedIndex()
selectedIndex -= 1

  • if selectedIndex < 0:
  • selectedIndex = self.choices.getItemCount()
  • if selectedIndex < -1:
  • selectedIndex = self.choices.getItemCount() - 1 self.choices.setSelectedIndex(selectedIndex) return

Original issue: (August 31, 2010 21:03:43)


From on February 22, 2011 15:46:21:
Thanks. Committed fix in 7cbf7e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.