From 5ccbad8359f8f0aa3a6fc3e3fd11d1c05726664e Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 1 Aug 2020 23:03:10 +0200 Subject: [PATCH] Fix transfer form reset --- static/js/transfer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/transfer.js b/static/js/transfer.js index 65184fd9..45d5508a 100644 --- a/static/js/transfer.js +++ b/static/js/transfer.js @@ -16,11 +16,13 @@ function reset(refresh=true) { $("#dest_note_list").html(""); let source_field = $("#source_note"); source_field.val(""); - source_field.trigger("keyup"); + let event = jQuery.Event("keyup"); + event.originalEvent = {charCode: 97}; + source_field.trigger(event); source_field.removeClass('is-invalid'); let dest_field = $("#dest_note"); dest_field.val(""); - dest_field.trigger("keyup"); + dest_field.trigger(event); dest_field.removeClass('is-invalid'); let amount_field = $("#amount"); amount_field.val("");