Cannot read property 'top' of undefined on keyup is pressed, in empty filtering list #4071

Closed
mirandadp opened this Issue Jan 5, 2017 · 2 comments

Projects

None yet

2 participants

@mirandadp

Description

When we press keyup in a select2, appling filter that not exist in list, it throw an exception: Uncaught TypeError: Cannot read property 'top' of undefined

When I press keyup is select2, and it has no data in the list (to be filtered), the following exception is throwing: Uncaught TypeError: Uncaught TypeError: Cannot read property 'top' of undefined
at Select2. (select2.full.js:1118)
at Select2.Observable.invoke (select2.full.js:637)
at Select2.Observable.trigger (select2.full.js:627)
at Select2.trigger (select2.full.js:5472)
at Select2. (select2.full.js:5365)
at Select2.Observable.invoke (select2.full.js:637)
at Select2.Observable.trigger (select2.full.js:627)
at Select2.trigger (select2.full.js:5472)
at DecoratedClass. (select2.full.js:5290)
at DecoratedClass.Observable.invoke (select2.full.js:637)

It happend in all select2 input filter.

Repro Steps:

to reproduce the error: goto input ('.select2-search__field') in select2, type any word, no include in list, and then push arrow up, then in the consolelog we can watch the error.

for example: in the examples page: https://select2.github.io/examples.html, go to "The basics\Single select boxes\ and turn it into this...", open select2 Alaska, and type 'sjdlkjsdlkfjsdlkjfls', then press keyup, and get it error, in console log.

@acburst
Collaborator
acburst commented Jan 5, 2017

This seems like a select2 error? Not sure what this has to do with materialize.

@mirandadp

sorry, I´m a mistake. It's to another place...

@mirandadp mirandadp closed this Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment