-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery-UI-slider still in conflict #575
Comments
Actually my fix is to load this block of code just before your script inclusion
For others users, just add this block of code in your page before including bootstrap-slider script and you won't get any problem with ui-slider, and ui-slider will keep working. Best regards. |
Feel free to submit a PR if it's of high importance. |
@seiyria No thanks. Have a lot of work to do, spent a lot of times to debug and report. Feel free to fix your software by yourself. You have the whole solution explained right there. Now, you know why it's still conflicting for some users. The |
@tlartaud Thank you for this work around. |
@tlartaud Thanks for finding this. With your solution above does it break the other libraries using .slider() ? |
Would it help to have the ability to define your own alternate namespace? This is our default behavior, but it seems like the ability to choose the namespace would be valuable? Let me know and I will add it to our "TODO" list. Thanks! |
@rovolution Hi. Yes that should help... But the really easier solution for everybody should be for you to only bind the namespace : I know your default behavior, but its wrong. Its a bad idea to do this. Index.html example 1
Index.html example 2
Your idea about giving us the ability to define our alternate namespace is not bad, BUT, it won't fix the first example out of the box. Developpers will still have to understand why, for some reasons, the slider function doesn't return the same thing in some pages, and then, define an alternate namespace. The really best way is to bind a complex namespace by default (bootstrapSlider is okay), and, optionnally, also give the ability to bind an alternative custom namespace. @caschbre I did not test that fix with all librairies, but with jquery-ui-slider, yes, both librairies will keep working with @seiyria Sounds easy for you to thumb down someone reporting you an issue without a PR. Maybe you can first discuss the problem instead of just asking for a PR that you would probably not accept. The problem for me was fixed by my workaround, but i wanted to help you understand the problem by reporting it. Even if its not a PR, im actually contributing to help solving an issue that a lot of people should encounter. Maybe that I should just stop writing anything here, and stop reporting, because apparently, this not what you expect from your users. Good luck to you. |
@tlartaud makes sense. Thanks for reporting the issue. I am always somewhat hesitant to publish breaking changes, so here is what we might do instead: have the slider always bind to the That should address the order of loaded scripts issue described here yet not break the slider for any existing users of the |
@rovolution yes, that's the correct thing to do. But you have to keep in mind that it won't fix the issue. Someone who's using your script with the To prevent that, you should also recommend in your documentation to use the namespace Regards. |
I am also going to add a console warning that appears indicating to the user that something is already bound to the slider namespace and that it is recommended that they use the longer namespace.
We will definitely make sure to emphasize that in the docs. thanks! |
The console warning is really a great idea, and can help developpers to not losing time searching everywhere what is going on. Thanks you to had accepted to discuss about it, and to find the best way to solve it ( I will definitely not say that to your mate @seiyria ... ) Have a nice day, |
I don't quite appreciate the snide remarks, as I've mostly held off commenting further in this issue. I still think it's quite simple: don't use two slider libraries. @rovolution is definitely being a great guy here and working towards a compromise, but we differ in opinion here. |
Locking this issue as I think its getting a bit off topic :) |
published to v9.1.0. see changelog for further details |
See this comment : #443 (comment)
(wont give any fiddle, sry)
Regards.
The text was updated successfully, but these errors were encountered: