소스 검색

Stopped refresh to top when `closeOnSelect: false`

Not really sure how the noHighlightUpdate variable is supposed to work, it is undefined all the time so it appears to be broken. I just referred to `this.opts.closeOnSelect` to get the status directly.
Joshua Jonah 11 년 전
부모
커밋
64256f27f2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -3107,7 +3107,7 @@ the specific language governing permissions and limitations under the Apache Lic
                 }
             });
 
-            if (this.highlight() == -1 && noHighlightUpdate !== false){
+            if (this.highlight() == -1 && noHighlightUpdate !== false && this.opts.closeOnSelect === true){
                 self.highlight(0);
             }