Red Hat Bugzilla – Bug 826772
Project-wide Search returns wrong results in some cases
Last modified: 2012-07-03 01:27:42 EDT
Description of problem:
Project wide search might return incorrect results in some cases. Looks like it's a timing issue with two events being fired near simultaneously.
Version-Release number of selected component (if applicable):
Sometimes. Seems to be related to how fast the "case sensitive" checkbox is clicked.
Steps to Reproduce:
1. Go to search and replace for any project.
2. Do a case insensitive search for any word.
3. Change the case of a few letters in the search term and immediately click the "case sesitive" checkbox.
The included results are case insensitive.
Only case sensitive results should be included.
This is caused by a race condition between the blur event on the search text box and the check event on the checkbox.
- provide an explicit 'search' button and don't run searches until it is clicked
- check for new text in search box before firing a search on case sensitivity change.
Fixed in 1.6.1 by adding an explicit 'Search' button removing the automatic search update. A new search will now only run when the 'Search' button is pressed, or when Enter is pressed while the search text box has focus.
Verified with Zanata version 1.6.1-SNAPSHOT (20120606-0019)