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

[AutoComplete] Fix openOnFocus behavior #3664

Closed
wants to merge 1 commit into from
Closed

[AutoComplete] Fix openOnFocus behavior #3664

wants to merge 1 commit into from

Conversation

bencallaway
Copy link

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Resolves #3381

AutoComplete will now close the child Popover element when requested (e.g.after clicking away from the Popover) only when the child TextField is not in focus.

@mbrookes mbrookes added bug 🐛 Something doesn't work PR: Review Accepted labels Mar 11, 2016
@mbrookes mbrookes self-assigned this Mar 11, 2016
@@ -390,6 +390,12 @@ const AutoComplete = React.createClass({
}
},

handlePopoverRequestClose() {
if (this.refs.searchTextField && !this.refs.searchTextField.state.isFocused) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we solve the issue without using a ref?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love to learn how. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm investigating. Expect a PR if I find how.

@oliviertassinari
Copy link
Member

@bencallaway Can you have a look at #3669?

@mbrookes mbrookes removed their assignment Mar 11, 2016
AutoComplete will close the child Popover element when requested (e.g.
after clicking away from the Popover) only when the child TextField
is not in focus.

Resolves #callemall/material-ui/3381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants