# HG changeset patch # User Edouard Tisserant # Date 1609252788 -3600 # Node ID abb487b56911727e16c1e622fd084476d75a73b6 # Parent 4cbf024a66401062f9feed3f4029467f48c10d7f SVGHMI: Fix bug in keypad leading to error messages in browser console when keypas has no Shift or CapsLock keys diff -r 4cbf024a6640 -r abb487b56911 svghmi/widget_keypad.ysl2 --- a/svghmi/widget_keypad.ysl2 Tue Dec 29 15:38:31 2020 +0100 +++ b/svghmi/widget_keypad.ysl2 Tue Dec 29 15:39:48 2020 +0100 @@ -175,11 +175,11 @@ this._editstr = this.editstr; this.Value_elt.textContent = this.editstr; } - if(this.shift != this._shift){ + if(this.Shift_sub && this.shift != this._shift){ this._shift = this.shift; (this.shift?widget_active_activable:widget_inactive_activable)(this.Shift_sub); } - if(this.caps != this._caps){ + if(this.CapsLock_sub && this.caps != this._caps){ this._caps = this.caps; (this.caps?widget_active_activable:widget_inactive_activable)(this.CapsLock_sub); }