From 1c98b68d377f4e915c280ce4f87e54e2bc4e88e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 7 Oct 2017 16:51:21 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20R=C3=A9cup=C3=A8re=20une=20valeur=20corr?= =?UTF-8?q?ecte=20quand=20la=20valeur=20du=20tt=5Finput=20a=20chang=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/templatetags/bootstrap_form_typeahead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/templatetags/bootstrap_form_typeahead.py b/machines/templatetags/bootstrap_form_typeahead.py index 1d6770f6..8a929fbf 100644 --- a/machines/templatetags/bootstrap_form_typeahead.py +++ b/machines/templatetags/bootstrap_form_typeahead.py @@ -231,7 +231,7 @@ def typeahead_updater( f_name ): def typeahead_change( f_name ): return 'function(evt) { ' \ - 'if (evt.currentTarget.value === "") {' \ + 'if ($("#'+input_id(f_name)+'").typeahead("val") === "") {' \ '$("#'+hidden_id(f_name)+'").val(""); ' \ '$("#'+hidden_id(f_name)+'").change();' \ '}' \