From d402b238cdddd4d6a0befa74fdeb8ef300b47c7a Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Sat, 18 Nov 2023 09:50:27 -0500 Subject: [PATCH] LEAF 4139 find alt solution for chosen dropbox behavior --- LEAF_Nexus/js/orgchartForm.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LEAF_Nexus/js/orgchartForm.js b/LEAF_Nexus/js/orgchartForm.js index 1b1ee3521..4fbc573a6 100644 --- a/LEAF_Nexus/js/orgchartForm.js +++ b/LEAF_Nexus/js/orgchartForm.js @@ -104,9 +104,13 @@ orgchartForm.prototype.getForm = function (UID, categoryID, indicatorID) { event ) { if (event.which == 13) { - setTimeout(() => { //timeout needed for ind 2 chosen dropdown + let elChosenDrop = null; + if(event.target.classList.contains('chosen-search-input')) { + elChosenDrop = document.querySelector('.chosen-with-drop'); + } + if(elChosenDrop === null) { //if a chosen dropdown box is still open, the first enter will just close it. $("#" + dialog.btnSaveID).trigger("click"); - }, 100); + } } }); },