elementalui / elemental

A flexible and beautiful UI framework for React.js
elemental-ui.com
MIT License
4.31k stars 216 forks source link

Runtime error when autoFocus applied to FormInput element #221

Open acampbellb opened 6 years ago

acampbellb commented 6 years ago

There is an error in the source code for the FormInput component. The functions 'focus' and 'select' both reference a member that is 'undefined' (input). The following code changes resolve the issue.

file: components\FormInput.js function: focus old: focus () { this.input.focus(); }, new: focus () { this.target.focus(); }, function: select old: select () { this.input.select(); }, new: select () { this.target.select(); },

clschnei commented 6 years ago

@acampbellb Do you have a PR with the changes?