From 47b58ce03cb0383e7c58c0b033474540af757697 Mon Sep 17 00:00:00 2001 From: plocket <52798256+plocket@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:51:16 -0500 Subject: [PATCH] Avoid re-appearance of ajax combobox dropdown on tab, enter, esc --- .../bootstrap-combobox/js/bootstrap-combobox.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docassemble_webapp/docassemble/webapp/static/bootstrap-combobox/js/bootstrap-combobox.js b/docassemble_webapp/docassemble/webapp/static/bootstrap-combobox/js/bootstrap-combobox.js index 3877622c8..c90a49721 100755 --- a/docassemble_webapp/docassemble/webapp/static/bootstrap-combobox/js/bootstrap-combobox.js +++ b/docassemble_webapp/docassemble/webapp/static/bootstrap-combobox/js/bootstrap-combobox.js @@ -617,6 +617,12 @@ case 9: // tab case 13: // enter + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + daFetchAjaxTimeoutFetchAfter = false; + daFetchAcceptIncoming = false; if (!this.shown) { return; } @@ -638,6 +644,12 @@ break; case 27: // escape + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + daFetchAjaxTimeoutFetchAfter = false; + daFetchAcceptIncoming = false; if (!this.shown) { return; }