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

openOnFocus={false} doesn't prevent opening when focused #1580

Closed
hakunin opened this issue Feb 28, 2017 · 9 comments · Fixed by #1902
Closed

openOnFocus={false} doesn't prevent opening when focused #1580

hakunin opened this issue Feb 28, 2017 · 9 comments · Fixed by #1902

Comments

@hakunin
Copy link

hakunin commented Feb 28, 2017

Hi,
I am trying to prevent the menu from opening on click (the component is styled as a user picker this behavior needs to be avoided) but it doesn't seem to work.
https://plnkr.co/edit/GqaFR7?p=preview

Looking at the code, setting false seems to have no value and using onFocus doesn't seem to have a way of preventing it either.

var isOpen = this.state.isOpen || this._openAfterFocus || this.props.openOnFocus;

@lauterry
Copy link

lauterry commented Mar 1, 2017

Hi @hakunin

A fix has been made : ffa1f2d

Have to wait for the next release

Best regards

@lauterry
Copy link

lauterry commented Mar 1, 2017

Hi @JedWatson

When do you think you can publish a new release with this fix ffa1f2d please ?

Best regards

@AttilaGal
Copy link

Noticed this behaviour in our application as well, it's quite annoying on mobile devices. We are using version 1.0.0-rc.3 Any update on when this might get released?

kind regards

@adelavina
Copy link

Waiting for a rc with this too. :(
Thanks.

@msclp
Copy link

msclp commented Jun 30, 2017

cannot wait for this fix

@jmcrthrs
Copy link

jmcrthrs commented Jul 4, 2017

The following pull request fixed this issue:

#1527

However the commit in that pull request has been overwritten by the following commit:

549d20a?diff=unified#diff-04191649796841200b33375bdff7c78fL366

@vutoan266
Copy link

vutoan266 commented Jul 21, 2017

It still run wrong for me:
<Select
name="destination"
clearable={false}
value={this.state.destination}
options={districts}
placeholder="District"
arrowRenderer={()=> undefined}
searchable={true}
openOnFocus={false}
onChange={(val) => {
val && this.setState({destination: val.value});
!val && this.setState({destination: null});
}}
Anyone help me. Many thanks

agirton added a commit to agirton/react-select that referenced this issue Jul 31, 2017
@Vizantiyec
Copy link

Still works wrong in "react-select": "^1.0.0-rc.5", will you fix it in rc.6? and when you plan to make the release of it.
Best regards!

@jesstelford
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants