[Koha-bugs] [Bug 13391] New: MARC 008 builder plugin not compatible with browser autocompletion
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Dec 4 13:54:36 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13391
Bug ID: 13391
Summary: MARC 008 builder plugin not compatible with browser
autocompletion
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Cataloging
Assignee: gmcharlt at gmail.com
Reporter: abl at biblos.pk.edu.pl
QA Contact: testopia at bugs.koha-community.org
CC: m.de.rooy at rijksmuseum.nl
In the koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js (line 317) there
are two JS events (onkeyup and onfocus) being handled for 008 MARC plugin
<input ...> fields (for MARC21 008 plugin, <input> is used e.g. for dates,
country codes and language codes). But there is a slight problem with onkeyup
event handler: apparently this event does not fire when:
- user starts to enter some characters using the keyboard,
- and then chooses something from the autocompletion list offered by browser.
End result is that in such circumstances only the first character[s] entered in
the given field are saved in 008 (only the part that was typed on the
keyboard), and the remaining characters are effectively lost / being ignored by
008 plugin (unless the user "returns" to this field, i.e. gives it focus once
again, before clicking "OK").
Replacing 'onkeyup' with 'oninput' in line 317 looks like the easiest solution
for this issue; it works fine in recent (HTML5 compliant) browsers, but OnInput
event handler is relatively new thing - it would not work in old, "legacy" WWW
browsers. I guess we can also add autocomplete='off' to the <input> fields
generated by renderPositions() function in xmlControlfield.js ;). I'm wondering
what would happen if we try to put both oninput=.. and onkeyup= event handlers
in those fields (probably both of them would fire when user enters something,
but maybe that will be not necessarily such a bad thing ?).
However, none of those methods are quite sufficient for older browsers.
Reparsing all fields on form submit may help a little bit - so changes in the
entered values which may have been previously ignored by the plugin would have
a chance to be saved in 008 after all - but that's only a partial solution, the
008 contents being displayed on top may still sometimes get "out of sync" with
the individual values below..
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list