New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Up arrow generates JS error #3523
Comments
I was able to reproduce this, here's the traceback Uncaught TypeError: Cannot read property 'top' of undefined
(anonymous function) @ select2.full.js:1076
S2.define.Observable.invoke @ select2.full.js:614
S2.define.Observable.trigger @ select2.full.js:604
S2.define.Select2.trigger @ select2.full.js:5167
(anonymous function) @ select2.full.js:5100
S2.define.Observable.invoke @ select2.full.js:614
S2.define.Observable.trigger @ select2.full.js:604
S2.define.Select2.trigger @ select2.full.js:5167
(anonymous function) @ select2.full.js:5018
S2.define.Observable.invoke @ select2.full.js:614
S2.define.Observable.trigger @ select2.full.js:608
(anonymous function) @ select2.full.js:1820
jQuery.event.dispatch @ jquery-git.js:4979
jQuery.event.add.elemData.handle @ jquery-git.js:4659 The issue appears to be that hitting UP will trigger the highlighting routines to shift the highlight, but that can't be done because there are no options in the dropdown. This should only happen if there is nothing in the results box, which currently can only happen if there is an AJAX error. Otherwise it will display the normal "no results found" message. I'm tempted to call this a duplicate of #3501. |
Actually I noticed this when I was trying to make options appear for multiple select, but was passing Ajax delay and dataType parameters. So no Ajax call was made, but also no options displayed :) That link to JsFiddle is what I mean |
This error still occurs in version 4.0.5. |
Seems like it only happens in controls populated via AJAX, when no results are returned by a request (even a successful request). |
Fixed in #5127. |
https://jsfiddle.net/urkaj76k/
Pressing Up arrow key, generates Uncaught TypeError: Cannot read property 'top' of undefined
The text was updated successfully, but these errors were encountered: