瀏覽代碼

close before destroying. fixes #1550

Igor Vaynberg 11 年之前
父節點
當前提交
238903f5f4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      select2.js

+ 2 - 0
select2.js

@@ -779,6 +779,8 @@ the specific language governing permissions and limitations under the Apache Lic
         destroy: function () {
             var element=this.opts.element, select2 = element.data("select2");
 
+            this.close();
+
             if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
 
             if (select2 !== undefined) {