Browse Source

Fixed undefined this.autofocus on destroy while creating on element that already have select2 applied

Foxel 12 years ago
parent
commit
a957ed81fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -756,7 +756,7 @@ the specific language governing permissions and limitations under the Apache Lic
                     .removeData("select2")
                     .unbind(".select2")
                     .attr({"tabindex": this.elementTabIndex})
-                    .prop("autofocus", this.autofocus)
+                    .prop("autofocus", this.autofocus||false)
                     .show();
             }
         },