Skip to content

Commit

Permalink
Fixed a drop down issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Troup committed Dec 8, 2023
1 parent 6ea11da commit 16d3203
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
15 changes: 8 additions & 7 deletions dist/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,14 @@
_parameter_Window.addEventListener("click", hideMenu);
}
function showDropDownMenu(e, control, dropDown, element, bindingOptions) {
cancelBubble(e);
if (dropDown !== null && dropDown.style.display !== "block") {
dropDown.style.display = "block";
renderDropDownItems(control, dropDown, element, bindingOptions);
} else {
hideDropDownMenu(dropDown);
}
setTimeout(function() {
if (dropDown !== null && dropDown.style.display !== "block") {
dropDown.style.display = "block";
renderDropDownItems(control, dropDown, element, bindingOptions);
} else {
hideDropDownMenu(dropDown);
}
}, 50);
}
function hideDropDownMenu(dropDown) {
if (dropDown !== null && dropDown.style.display !== "none") {
Expand Down
16 changes: 8 additions & 8 deletions dist/select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,16 @@
}

function showDropDownMenu( e, control, dropDown, element, bindingOptions ) {
cancelBubble( e );

if ( dropDown !== null && dropDown.style.display !== "block" ) {
dropDown.style.display = "block";

renderDropDownItems( control, dropDown, element, bindingOptions );

} else {
hideDropDownMenu( dropDown );
}
setTimeout( function() {
if ( dropDown !== null && dropDown.style.display !== "block" ) {
dropDown.style.display = "block";

renderDropDownItems( control, dropDown, element, bindingOptions );

} else {
hideDropDownMenu( dropDown );
}
}, 50 );
}

function hideDropDownMenu( dropDown ) {
Expand Down

0 comments on commit 16d3203

Please sign in to comment.