Browse Source

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 years ago
parent
commit
64256f27f2
1 changed files with 1 additions and 1 deletions
  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);
             }