From: Bill Erickson Date: Mon, 2 May 2016 15:57:14 +0000 (-0400) Subject: KMAIN-1830 Backspace clears on barcode only X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9436d29075e8b2ddc119c7e05952e430b6b12cff;p=working%2FEvergreen.git KMAIN-1830 Backspace clears on barcode only Only apply backspace-clears-barcode handling to the barcode input. As it was, it was defaulting to all text inputs (e.g. stat cat values). Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 62a4a2a611..6601745967 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -1611,7 +1611,7 @@ function attachWidgetEvents(fmcls, fmfield, widget) { // when creating a new patron, a backspace in the barcode // entry field clears the barcode and username values. if (patron.isnew()) { - dojo.connect(dojo.byId("barcode"), "onkeypress", + dojo.connect(widget.widget, "onKeyPress", function(event) { if (event.keyCode != 8) return // 8 = Backspace Key findWidget('au', 'usrname').widget.attr('value', '');