Bug 599687 - repositioning the cursor in the SearchBar does not refresh suggestions
repositioning the cursor in the SearchBar does not refresh suggestions
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
3.0.0
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
Sunil Kondkar
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-03 14:37 EDT by Joseph Marques
Modified: 2010-08-12 12:47 EDT (History)
0 users

See Also:
Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:47:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2010-06-03 14:37:24 EDT
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 14:46:18 EDT
commit ea38307cc914df400665f0af13a1fa3a1b200096
Author: Joseph Marques <joseph@redhat.com>
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 07:35:10 EDT
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 12:47:01 EDT
Mass-closure of verified bugs against JON.

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