Prevent clicking on list items dismissing the modal window
@@ -422,6 +422,17 @@ $(document).ready(function () {
this.box.insertAfter(this.input).css({top: 35, left: 0});
};
+ // Prevent clicking on list items dismissing the modal window
+ let autoCompletes = $(".autocomplete-light-widget > input.autocomplete");
+ if (autoCompletes.length) {
+ autoCompletes.each(function (i, el) {
+ $(el).yourlabsAutocomplete()
+ .input.bind('selectChoice', function (e, choice, autocomplete) {
+ e.stopPropagation();
+ });
+ });
+ }
+
// Can be used to obtain an element's HTML including itself and not just its content
jQuery.fn.outerHTML = function () {
return jQuery('<div />').append(this.eq(0).clone()).html();
