From 9436d29075e8b2ddc119c7e05952e430b6b12cff Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 2 May 2016 11:57:14 -0400 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/actor/user/register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', ''); -- 2.11.0