Bug 599687 - repositioning the cursor in the SearchBar does not refresh suggestions
Summary: repositioning the cursor in the SearchBar does not refresh suggestions
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 18:37 UTC by Joseph Marques
Modified: 2010-08-12 16:47 UTC (History)
0 users

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:47:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Joseph Marques 2010-06-03 18:37:24 UTC
Description of problem:

The SearchBar suggestions should be refreshed if the user hits left-arrow or right-arrow, or if the user left-clicks the cursor to a different position.

How reproducible:

Every time.

Steps to Reproduce:
1. go to the inventory browser
2. enter "type=cpu category=server"
3. using the mouse or left-arrow/right-arrow keys, reposition the cursor somewhere in the middle of the text
  
Actual results:

the suggestions do not refresh

Expected results:

the search suggestion popup should refresh itself with entries that are relevant to the cursor position.  in other words, if @@@ represents where the cursor is, and the user positioned the cursor after the "type=" expression above, it would give you "type=@@@cpu category=server"

from here, the user should be given suggestions based off of the available types in the system (in other words, it should be treated as if the use had entered "type="

furthermore, when the user selects a suggestion from the drop-down, the "cpu" portion should be replaced with the selection.

Comment 1 Joseph Marques 2010-06-03 18:46:18 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:35:10 UTC
Verified on 'jon-server-2.4.0.Beta1' build.

Using the mouse or left-arrow/right-arrow keys, repositioning the cursor displays available suggestions and selecting the suggestion replaces with the selection.
(Ex: when user repositions the cursor after type= in expression "type=cpu category=server" , it displays available types and if user selects a type such as 'Apache HTTP Server', the suggestion gets selected.

Comment 3 Corey Welton 2010-08-12 16:47:01 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.