Description of problem: Although the search suggestion popup was implemented to work with the keyboard (use up/down to move between the items, press enter to select an item), it should be robust enough to work with mouse clicks as well (since we're not going to prevent the user from doing that). How reproducible: Every time. Steps to Reproduce: 1. Go to resource browser 2. Enter "type=" into the SearchBar 3. Use the mouse and left-click one of the suggestions Actual results: User sees an ugly error message. Expected results: The clicked suggestion should help auto-complete the text in the SearchBar.
commit ea38307cc914df400665f0af13a1fa3a1b200096 Author: Joseph Marques <joseph> Date: Thu Jun 3 14:42:26 2010 -0400 BZ-599652 / BZ-599687 - more robust support for keyboard/mouse events as applied to search suggestions ----- BZ-599652 - prevent IndexOutOfBoundsException when mouse-clicking to select a search suggestion * a mouse-click will move the focus off of the textbox * an unfocused textbox has a cursor position of -1 * suggestion selection algorithm requires a valid cursor position * fix is to manually manage the last known position of the cursor BZ-599687 - support refreshing suggestions in more circumstances * left-arrow/right-arrow in the textbox will show correct suggestions based on cursor position * mouse-click events in the textbox will show correct suggestions based on cursor position
Verified on 'jon-server-2.4.0.Beta1' build. Selecting a search suggestion via mouse click selects the suggestion and auto-completes the text in search bar. (Ex: entered type= in searchbar and selected suggestion "Apache Virtual Host" via left click. The text is selected and displayed in searchbar.).
Mass-closure of verified bugs against JON.