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

Fix context menus selecting first item by default. #6110

Merged
merged 1 commit into from Jun 17, 2016

Conversation

Projects
None yet
2 participants
@danhp
Copy link
Member

danhp commented Jun 17, 2016

This sets the default value for positioningItem to -1 (an invalid value) so that no item is selected.
The proper checks are performed by

if (positioning_item < [menu numberOfItems] && positioning_item >= 0)

Closes #6109

if (typeof x !== 'number') x = -1
if (typeof y !== 'number') y = -1
if (typeof positioningItem !== 'number') positioningItem = 0

// Default to not highliting any item.

This comment has been minimized.

Copy link
@kevinsawicki

kevinsawicki Jun 17, 2016

Contributor

highliting -> highlighting

@danhp danhp force-pushed the dan/iss6109 branch from 37cb1dd to a8a6f6f Jun 17, 2016

@kevinsawicki kevinsawicki merged commit 9afff89 into master Jun 17, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@kevinsawicki

This comment has been minimized.

Copy link
Contributor

kevinsawicki commented Jun 17, 2016

👍 🚢

@kevinsawicki kevinsawicki deleted the dan/iss6109 branch Jun 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.