Actually, I faced similar issue in AEMaaCS. But now its working fine
after making few changes to the previous code. Try debugging the js and
see where it is getting stuck. Also try changing
"$(document).on("selected", ".cq-dialog-dropdown-showhide", function (e)
{}" to "$(document).on("change", ".cq-dialog-dropdown-showhide",
function (e) {}"