Bug 759994 - Editor table stops working after 'Source and Target' search returns no results
Summary: Editor table stops working after 'Source and Target' search returns no results
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 1.4.3-SNAPSHOT
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Alex Eng
QA Contact: Ding-Yi Chen
Depends On:
Blocks: Zanata-1.4.4
TreeView+ depends on / blocked
Reported: 2011-12-05 06:32 UTC by David Mason
Modified: 2012-01-26 08:22 UTC (History)
3 users (show)

Fixed In Version: 1.4.4-SNAPSHOT (20111206-1747)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-12-13 01:52:12 UTC

Attachments (Terms of Use)

Description David Mason 2011-12-05 06:32:09 UTC
Description of problem:

After a search of source and target textflows has returned no results, any attempt to clear or change the search causes the editor table to remain blank until a different document is loaded.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Load a document with 1 or more text flows
2. Click the search textbox and type a string that is not present in any flows
3. Press Enter so that "There is no data to display" is shown.
4a. Click the X to clear the results
4b. Type another string in the box and press Enter

Loading a document with no content may also cause the same behaviour.

Actual results:
The editor table is blank and no text flows are shown.

Expected results:
The results of the new search are shown, or all textflows if the search was cleared.

Additional info:
Exception on Javascript console whenever this happens (just a gwt UmbrellaException though). Probably caused by trying to auto-save with an empty table.

Comment 1 Sean Flanigan 2011-12-05 06:37:50 UTC
Possible workarounds: (a) go back to document list and select a different document, or (b) reload page with F5.

Comment 3 David Mason 2011-12-06 06:29:20 UTC
merged to 1.5

Comment 4 Ding-Yi Chen 2011-12-08 06:00:26 UTC
VERIFIED with Zanata version 1.4.4-SNAPSHOT (20111206-1747)

yet problem still exist in Zanata version 1.5-SNAPSHOT (20111201-1521)

Comment 7 Ding-Yi Chen 2011-12-09 06:10:42 UTC
VERIFIED with Zanata version 1.5-SNAPSHOT (20111209-1504)

Comment 8 Ding-Yi Chen 2011-12-13 01:52:12 UTC
REVERIFIED with staging machine Zanata version 1.4.4 (20111211-2301)

Comment 9 Joshua Wulf 2012-01-26 08:22:32 UTC

Cause: Users may search through a document in the online translation editor for occurrences of a search term. Both original strings and any translations are searched for occurrences of the search term. When a successful match is found, it is highlighted in the translation editor. In the case where no match was found, the editor attempted to highlight a non-existent string.

Consequence: When a search returned no results in the document currently loaded in the translation editor, the translation editor contents would blank out, requiring the page to be reloaded.

Fix: The code was modified so that the translation unit highlighting occurs only when an occurrence of a search term is located in the translation editor. If no occurrences of the search term are located, no highlighting takes place.

Result: Searches with no results no longer cause the translation editor to blank out.

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