Skip to content

Commit

Permalink
fix: remove blur event handler for iOS (#46)
Browse files Browse the repository at this point in the history
* Correct blur event on iOS
- Removing onBlur handler and reset function

* Contributors

* Contributors correction

* remove unnecessary blur stuff
  • Loading branch information
Jo茫o Alberto authored and Kent C. Dodds committed Jul 28, 2017
1 parent 008129d commit 2e7f2c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@
"contributions": [
"code"
]
},
{
"login": "psicotropicos",
"name": "Jo茫o Alberto",
"avatar_url": "https://avatars3.githubusercontent.com/u/10820159?v=4",
"profile": "https://twitter.com/psicotropidev",
"contributions": [
"code"
]
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Primitives to build simple, flexible, WAI-ARIA compliant React autocomplete comp
[![downloads][downloads-badge]][npmcharts]
[![MIT License][license-badge]][LICENSE]

[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Code of Conduct][coc-badge]][coc]

Expand Down Expand Up @@ -198,7 +198,7 @@ Thanks goes to these people ([emoji key][emojis]):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[馃捇](https://github.com/paypal/react-autocompletely/commits?author=kentcdodds "Code") [馃摉](https://github.com/paypal/react-autocompletely/commits?author=kentcdodds "Documentation") [馃殗](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [鈿狅笍](https://github.com/paypal/react-autocompletely/commits?author=kentcdodds "Tests") | [<img src="https://avatars1.githubusercontent.com/u/8162598?v=4" width="100px;"/><br /><sub>Jack Moore</sub>](https://github.com/jtmthf)<br />[馃挕](#example-jtmthf "Examples") | [<img src="https://avatars1.githubusercontent.com/u/2762082?v=4" width="100px;"/><br /><sub>Travis Arnold</sub>](http://travisrayarnold.com)<br />[馃捇](https://github.com/paypal/react-autocompletely/commits?author=souporserious "Code") [馃摉](https://github.com/paypal/react-autocompletely/commits?author=souporserious "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/244704?v=4" width="100px;"/><br /><sub>Jeremy Gayed</sub>](http://www.jeremygayed.com)<br />[馃挕](#example-tizmagik "Examples") | [<img src="https://avatars3.githubusercontent.com/u/6270048?v=4" width="100px;"/><br /><sub>Haroen Viaene</sub>](https://haroen.me)<br />[馃挕](#example-Haroenv "Examples") | [<img src="https://avatars2.githubusercontent.com/u/15073300?v=4" width="100px;"/><br /><sub>monssef</sub>](https://github.com/rezof)<br />[馃挕](#example-rezof "Examples") | [<img src="https://avatars2.githubusercontent.com/u/5382443?v=4" width="100px;"/><br /><sub>Federico Zivolo</sub>](https://fezvrasta.github.io)<br />[馃摉](https://github.com/paypal/react-autocompletely/commits?author=FezVrasta "Documentation") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/746482?v=4" width="100px;"/><br /><sub>Divyendu Singh</sub>](https://divyendusingh.com)<br />[馃挕](#example-divyenduz "Examples") | [<img src="https://avatars1.githubusercontent.com/u/841955?v=4" width="100px;"/><br /><sub>Muhammad Salman</sub>](https://github.com/salmanmanekia)<br />[馃捇](https://github.com/paypal/react-autocompletely/commits?author=salmanmanekia "Code") |
| [<img src="https://avatars3.githubusercontent.com/u/746482?v=4" width="100px;"/><br /><sub>Divyendu Singh</sub>](https://divyendusingh.com)<br />[馃挕](#example-divyenduz "Examples") | [<img src="https://avatars1.githubusercontent.com/u/841955?v=4" width="100px;"/><br /><sub>Muhammad Salman</sub>](https://github.com/salmanmanekia)<br />[馃捇](https://github.com/paypal/react-autocompletely/commits?author=salmanmanekia "Code") | [<img src="https://avatars3.githubusercontent.com/u/10820159?v=4" width="100px;"/><br /><sub>Jo茫o Alberto</sub>](https://twitter.com/psicotropidev)<br />[馃捇](https://github.com/paypal/react-autocompletely/commits?author=psicotropicos "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors][all-contributors] specification.
Expand Down
9 changes: 0 additions & 9 deletions src/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Input extends Component {
static propTypes = {
onChange: PropTypes.func,
onKeyDown: PropTypes.func,
onBlur: PropTypes.func,
getValue: PropTypes.func,
defaultValue: PropTypes.string,
}
Expand All @@ -25,7 +24,6 @@ class Input extends Component {
this.autocomplete.input = this
this.handleChange = compose(this.handleChange, this.props.onChange)
this.handleKeyDown = compose(this.handleKeyDown, this.props.onKeyDown)
this.handleBlur = compose(this.handleBlur, this.props.onBlur)
}

keyDownHandlers = {
Expand Down Expand Up @@ -67,12 +65,6 @@ class Input extends Component {
this.updateInputValue(event.target.value)
}

handleBlur = () => {
if (!this.autocomplete.isMouseDown) {
this.autocomplete.reset()
}
}

reset = () => {
moveCursorToTheEnd(this._inputNode)
}
Expand Down Expand Up @@ -120,7 +112,6 @@ class Input extends Component {
{...rest}
onChange={this.handleChange}
onKeyDown={this.handleKeyDown}
onBlur={this.handleBlur}
ref={node => (this._inputNode = node)}
/>
)
Expand Down

0 comments on commit 2e7f2c3

Please sign in to comment.