Просмотр исходного кода

Fix wrong context on Select2 v4 field width calculation (#4244)

alexndlm 8 лет назад
Родитель
Сommit
550425a266
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Resources/public/Admin.js

+ 2 - 2
Resources/public/Admin.js

@@ -79,7 +79,7 @@ var Admin = {
                     width: function(){
                         // Select2 v3 and v4 BC. If window.Select2 is defined, then the v3 is installed.
                         // NEXT_MAJOR: Remove Select2 v3 support.
-                        return Admin.get_select2_width(window.Select2 ? this.element : jQuery(this));
+                        return Admin.get_select2_width(window.Select2 ? this.element : select);
                     },
                     dropdownAutoWidth: true,
                     minimumResultsForSearch: 10,
@@ -450,7 +450,7 @@ var Admin = {
             width: function(){
                 // Select2 v3 and v4 BC. If window.Select2 is defined, then the v3 is installed.
                 // NEXT_MAJOR: Remove Select2 v3 support.
-                return Admin.get_select2_width(window.Select2 ? this.element : jQuery(this));
+                return Admin.get_select2_width(window.Select2 ? this.element : subject);
             },
             dropdownAutoWidth: true,
             data: transformedData,