Koha/koha-tmpl/opac-tmpl/bootstrap
Jonathan Druart 2e4b574074 Bug 5844: Avoid strings cut on unhighlighing
If a user is searching for several words and that one is contained in
another ( "mag ma" ), some characters are cut (removed from the DOM!).

To reproduce:
1/ search for "mag ma m"
2/ The result page contains "Magazine"
3/ "Mag" is highlighted
4/ Click on the "Unhighlight" link
5/ The "Magazine" words become "azine", "Mag" has been cut.
There is no way to show these characters again.

Test plan:
1/ Confirm the bad behavior without this patch
2/ Apply this patch
3/ search for "mag ma m"
4/ The result page contains "Magazine"
5/ "Mag" is highlighted
6/ Click on the "Unhighlight" link
7/ strings are unhighlighted and still in the DOM :)

Note that the Highlight link won't work very well (only "a" will be
highlighted, but considered as minor since this did not work before the
patch neither).

Followed test plan. Strings are no longer cut when unhiglighted.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 10:13:18 -03:00
..
css Bug 12399 - opaccredits printing at top on printable version 2015-03-15 09:09:45 -03:00
en Bug 9120: Prevent form submission on adding tags - OPAC 2015-03-30 13:46:44 -03:00
images
itemtypeimg
js Bug 11982 - Show local cover image in the intranet biblio details page 2015-03-30 13:45:20 -03:00
less Bug 11430 [Follow-up] Search history: Delete selected lines 2015-03-11 15:02:45 -03:00
lib Bug 5844: Avoid strings cut on unhighlighing 2015-03-31 10:13:18 -03:00