Dropdown (BS) not compatible with modal forms?


I came across a curious issue - I have a modal form in which I’ve placed a BS Dropdown. Now, without even trying to capture any of the Dropdown events, by simply clicking on the Dropdown it ‘resets’ my modal form. By this I mean that my modal form’s ‘_onshow()’ function is called (which happens to clear all the fields on the form!).

I’ve tested this by opening a new project, creating a modal form on which I have placed a BS Dropdown and a BS Input and the only code I’ve added is an ‘_onshow()’ event function to clear the BS Input when the modal form is shown. Every time I simply click on the Dropdown, the Input is cleared, so it’s calling the ‘_onshow()’ function for no apparent reason.

Is this a known issue? I can only guess that the dropdown list is perhaps a modal form itself and it’s maybe ‘clashing’ with my modal form? Or is it a bug?



We’re not the authors of Bootstrap or the jQuery Modal library, so there probably isn’t much we can do here. You can report bugs in jQuery Modal here:


Hi (is that you, George?)

I’m hoping you can help. I reported the bug to kylefox and submitted a test app which you can find at https://jimos.si/test and he replied as follows:

Is there any way you can simplify this test case? There’s a whole bunch of other scripts that makes it difficult to understand what’s actually happening here. It would be much easier to troubleshoot if you could only use jQuery Modal + Bootstrap, and include exactly the code you’re using to work with the modal.

It’s possible there’s just a general conflict happening with Bootstrap here :frowning:️This modal often doesn’t play nicely with Bootstrap because of the naming conflict (not just with $modal, but events, etc).

I have no idea how to do any of this without using AppStudio. Can you help? I’d really like to try and get this bug fixed.



I can confirm that jquery-modal doesn’t play nicely with Bootstrap - we need to rename #modal. I don’t think we do anything with events, however. You might ask him about the events to see if there is a workaround.


Well, right now he’s only asking if I can upload my very simple test page with only the bare minimum as opposed to all the code that Appstudio will add as standard so he can look at it himself.

He hasn’t really confirmed anything and I can’t really ask anything until I let him see the error with the minimum code so he can investigate.

Can you create my test app using minimum code? Or can you quickly just rename #modal and see if that fixes it?



We’re really backed up here, and creating such an app isn’t covered by free support:



Fair enough.

Will you rename #modal for the next release?



We rename modal to jqmodal already. Is there another change we can make?


I’ve updated kylefox and waiting to see what he replies. I’ll let you know if there’s anything else we need to do.

Do you know when you’ll release the next AppStudio update so I can test your rename?



It’s always been that way - it wouldn’t work at all otherwise. ‘modal’ is renamed ‘jqmodal’ in the version we ship.