Issue In Bootstrap Form
Hi
I am creating an issue cause you did not respond to the findings I posted. The issue does not originate from the modal but from the form. Hope you can check and provide a fix soon.
So I managed to figure out a major bug in this plugin. This plugin cannot be used within a form when using bootstrap. As soon as the form tags are used, issues I have mentioned above arises. Additionally the element on change method fires an infinite loop that does not exit even after the event is fired. I also manage to figure out that this has nothing to do with modals as even an on page form causes this issue.
inputpicker-master without form.zip inputpicker-master with form.zip
Originally posted by @KirenJames7 in https://github.com/ukalpa/inputpicker/issues/43#issuecomment-487256638
Hi @KirenJames7 Thank you very much for the feedback. I checked your code and encountered the different circumstance with you. What I have found is that both of two examples as you provided in the ajax mode are unable to be loaded when the page opens in the first time, after you reload the page, the inputpicker can be opened normally.
Can you please confirm if you encounter the same issue as me? I do not know what your means of "change method fires an infinite loop that does not exit even after the event is fired", can you please explain it? Thanks a lot.
Hi @ukalpa
"change method fires an infinite loop that does not exit even after the event is fired" hope the below explains
Check the console log in the example with the form element. You could see that once the input is focused a loop starts running and once item is selected of input focus is blurred the loop seems to be still running. (what I mean by loop may be a recursive function i couldn't dive deep into the plugin code). I couldn't check the ajax functionality yet as I haven't linked the back end to the app I am developing. But I will try to give you a feedback on this ASAP. However there seems to be some bugs here and there.
However I hope you could fix the issue that occurs with the form tag ASAP. It's hard not to use the form tag.