https://github.com/fudanfuhua/react-focus-element
react working in contenteditable element for iphone,chrome,safari(webkit kernel browser) to fix focus bug
https://github.com/fudanfuhua/react-focus-element
contenteditable focus react
Last synced: about 2 months ago
JSON representation
react working in contenteditable element for iphone,chrome,safari(webkit kernel browser) to fix focus bug
- Host: GitHub
- URL: https://github.com/fudanfuhua/react-focus-element
- Owner: fudanfuhua
- Created: 2017-09-16T15:04:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-12T15:03:43.000Z (over 8 years ago)
- Last Synced: 2024-04-26T02:44:12.445Z (about 2 years ago)
- Topics: contenteditable, focus, react
- Language: JavaScript
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-focus-element
[](https://github.com/prettier/prettier)
[](https://travis-ci.org/danawoodman/react-fontawesome)
[](https://david-dm.org/danawoodman/react-fontawesome)
[](https://www.npmjs.com/package/react-fontawesome)
[](https://www.npmjs.com/package/react-fontawesome)
> A React component working use "contenteditable element" to fix focus bug on iphone, mac, and chrome(webkit kernel browser).
## Install
```
npm install --save react-focus-element
```
*Note: This component can work on most platform and most browser*
## Usage
```js
var React = require('react');
var FocusElement = require('react-focus-element');
React.render( {}} />, document.body);
```
## Examples
```js
var React = require('react');
var FocusElement = require('react-focus-element');
var MyComponent = React.createClass({
render: function () {
return (
{this.handleArticleContentChange('title', e.target)}}
/>
);
}
});
```
## Contributing
Pull requests welcome!
Run the test suite with `npm test` and format your code with `npm run format`. Make sure tests are passing and that you write tests for new features and document changes to the API with updates to the JSDocs.
Before you submit your pull request, run `npm run dist` to build the project and commit the changes.
## License
[MIT](license) © [fudanfuhua][author]
[author]: https://github.com/fudanfuhua