Merge pull request #14229 from Godmartinz/select2-target-fix
Fixed select inputs un-select2-ifying on mobile
This commit is contained in:
commit
a7af987322
2 changed files with 1 additions and 8 deletions
|
@ -191,17 +191,12 @@ $(document).ready(function () {
|
||||||
* Select2
|
* 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) {
|
$('select.select2:not(".select2-hidden-accessible")').each(function (i,obj) {
|
||||||
{
|
{
|
||||||
$(obj).select2();
|
$(obj).select2();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// $('.datepicker').datepicker();
|
// $('.datepicker').datepicker();
|
||||||
// var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
|
// var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
|
||||||
|
|
|
@ -131,8 +131,6 @@
|
||||||
|
|
||||||
|
|
||||||
$(":submit").attr("disabled", "disabled");
|
$(":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) {
|
$("[name='status_id']").on('select2:select', function (e) {
|
||||||
if (e.params.data.id != "") {
|
if (e.params.data.id != "") {
|
||||||
console.log(e.params.data.id);
|
console.log(e.params.data.id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue