Merge pull request #14229 from Godmartinz/select2-target-fix

Fixed select inputs un-select2-ifying on mobile
This commit is contained in:
snipe 2024-02-08 23:04:55 +00:00 committed by GitHub
commit a7af987322
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 8 deletions

View file

@ -191,17 +191,12 @@ $(document).ready(function () {
* Select2
*/
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
// Vue collision: Avoid overriding a vue select2 instance
// by checking to see if the item has already been select2'd.
$('select.select2:not(".select2-hidden-accessible")').each(function (i,obj) {
{
$(obj).select2();
}
});
}
// $('.datepicker').datepicker();
// var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value

View file

@ -131,8 +131,6 @@
$(":submit").attr("disabled", "disabled");
//The line below needs to be here because in mobile view the status_id select2 forgets its select2 so this makes it function properly.
$("[name='status_id']").select2();
$("[name='status_id']").on('select2:select', function (e) {
if (e.params.data.id != "") {
console.log(e.params.data.id);