Bug 599652 - selecting a search suggestion via mouse click throws exception
Summary: selecting a search suggestion via mouse click throws exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 3.0.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-03 17:14 UTC by Joseph Marques
Modified: 2010-08-12 16:53 UTC (History)
0 users

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:53:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Joseph Marques 2010-06-03 17:14:56 UTC
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.

Comment 1 Joseph Marques 2010-06-03 18:46:39 UTC
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

Comment 2 Sunil Kondkar 2010-06-07 11:51:45 UTC
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.).

Comment 3 Corey Welton 2010-08-12 16:53:27 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.