From a957ed81fd90bca0f7c810e97195bfb62ab1bd7b Mon Sep 17 00:00:00 2001 From: Foxel Date: Thu, 9 May 2013 10:36:46 +0700 Subject: [PATCH] Fixed undefined this.autofocus on destroy while creating on element that already have select2 applied --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index dd9ed6dc..17253033 100644 --- a/select2.js +++ b/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(); } },