equal
deleted
inserted
replaced
87 end_modal.call(this); |
87 end_modal.call(this); |
88 } |
88 } |
89 |
89 |
90 on_Enter_click() { |
90 on_Enter_click() { |
91 let coercedval = (typeof this.initial) == "number" ? Number(this.editstr) : this.editstr; |
91 let coercedval = (typeof this.initial) == "number" ? Number(this.editstr) : this.editstr; |
92 if(isNaN(coercedval)){ |
92 if(typeof coercedval == 'number' && isNaN(coercedval)){ |
|
93 // revert to initial so it explicitely shows input was ignored |
93 this.editstr = String(this.initial); |
94 this.editstr = String(this.initial); |
94 this.update(); |
95 this.update(); |
95 } else { // revert to initial so it explicitely shows input was ignored |
96 } else { |
96 let callback_obj = this.result_callback_obj; |
97 let callback_obj = this.result_callback_obj; |
97 end_modal.call(this); |
98 end_modal.call(this); |
98 callback_obj.edit_callback(coercedval); |
99 callback_obj.edit_callback(coercedval); |
99 } |
100 } |
100 } |
101 } |