Bug 32261: Patron autocomplete - do not empty text field
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 18 Nov 2022 08:52:35 +0000 (09:52 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 7 Dec 2022 14:36:53 +0000 (11:36 -0300)
commit3ce2f6e7005ba3d85a7ea51b7c7c5a9f3ab1fb4e
treee92ba31dc8209632fd10dfb61ebc024c82b1f028
parent3411a2c0021da2ff9fe91092c1fa202dfaa04f71
Bug 32261: Patron autocomplete - do not empty text field

The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.

Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js