javascript - executing preventDefault() with BootstrapDialog -
i using bootstrapdialog (nakupanda) , selectize (brian reavis) the process follows: open html defined modal dialog several selectize fields on it, each of has list of items , top of list create new when create new selected onchange event of selectize triggered , call function , opens bootstrapdialog below user input. the problem when user fills in field , presses enter both first , second dialog box close. happens when user presses enter. not if okay button pressed. i call event.preventdefault() when open first dialog box not stop problem. as appreciated. first modal dialog definition <div class="modal fade " id="mymodal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button...