Skip to content
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

Uncaught TypeError: Cannot read property 'size' of undefined #47555

Closed
vscodeerrors opened this issue Apr 10, 2018 · 5 comments
Closed

Uncaught TypeError: Cannot read property 'size' of undefined #47555

vscodeerrors opened this issue Apr 10, 2018 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug dropdown DropDown (SelectBox widget) native and custom issues

Comments

@vscodebot
Copy link

vscodebot bot commented Apr 10, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@joaomoreno joaomoreno self-assigned this Apr 11, 2018
@GongT
Copy link

GongT commented May 29, 2018

doesn't fully fixed:


A:
this.select(undefined)
native select have a "no selection" state.

this.selectList.setFocus([this.selected]);
to
this.selectList.setFocus([this.selected || 0]);

can fix this. no selection dropdown is same as selected first element.


B:
new SelectBox([], undefined, ....)
native select can have no element.

but select box custom will throw this error.

@joaomoreno joaomoreno added this to the May 2018 milestone May 30, 2018
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug list-widget List widget issues labels May 30, 2018
@joaomoreno joaomoreno assigned cleidigh and unassigned joaomoreno May 31, 2018
@joaomoreno joaomoreno modified the milestones: May 2018, Backlog May 31, 2018
@joaomoreno joaomoreno added dropdown DropDown (SelectBox widget) native and custom issues and removed list-widget List widget issues labels May 31, 2018
@joaomoreno
Copy link
Member

joaomoreno commented May 31, 2018

@cleidigh This can be reproduced by having an empty dropdown and simply opening it. There are many places in the code in which a selected number is assumed to exist. There are also many this.selectList.getFocus()[0]. When the dropdown is empty this returns undefined.

cc @bpasero

@bpasero bpasero modified the milestones: Backlog, June 2018 May 31, 2018
@bpasero bpasero assigned bpasero and unassigned bpasero Jun 9, 2018
@bpasero bpasero removed this from the June 2018 milestone Jun 11, 2018
@bpasero
Copy link
Member

bpasero commented Jun 11, 2018

Pushed a workaround for this particular crash via 68f1bc2

bpasero added a commit that referenced this issue Jun 11, 2018
@TylerLeonhardt
Copy link
Member

@bpasero no context on this issue but, I follow vscode on CodeTriage 😊 it looks like it could be closed?

@isidorn isidorn closed this as completed Aug 10, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug dropdown DropDown (SelectBox widget) native and custom issues
Projects
None yet
Development

No branches or pull requests

7 participants