Dynamic Select empty when opening second time. #5935
Comments
Thank for reporting the issue. This is indeed a bug. |
Cleaned up the test page (missing |
I removed the old dialog page of select if it exits in the |
Thx guys! @uGoMobi, One question. Do I always have to use pageinit when adding events like click ets? |
I strongly recommend to always bind to As @vstars pointed out, the problem here is indeed the selectmenu dialog page that remains in the DOM, only the list is removed from the dialog. The dialog that is created gets the same ID as your select with the "-dialog" suffix. You create a new select with the same ID each time the button on the homepage is clicked. The framework doesn't create a new dialog a second time because there is already a dialog with that ID. If you don't give the select an ID, the dialog gets a random ID However, this way you can end up with many dialogs in the DOM which is not good. So a better workaround is to remove the dialog with custom code. See: http://jsbin.com/owasir/29/edit |
Thank you very much. |
…ect empty when opening second time. (cherry picked from commit afabf5b)
Hi,
When opening select(dromdown) for secod time, the list is empy. This happens only if the list does not fit on the screen:
http://jsfiddle.net/nzHxZ/1/
You wil see that big dropdown is empty when opening second time.
The text was updated successfully, but these errors were encountered: