rfe

react-focus-element

react working in contenteditable element for iphone,chrome,safari(webkit kernel browser) to fix focus bug

Showing:

Popularity

Downloads/wk

0

GitHub Stars

2

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

1.4KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

react-focus-element

styled with prettier Travis CI build status Dependency Status View on npm View on npm

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

var React = require('react');
var FocusElement = require('react-focus-element');

React.render(<FocusElement onInput={(e) => {}} />, document.body);

Examples

var React = require('react');
var FocusElement = require('react-focus-element');

var MyComponent = React.createClass({
  render: function () {
    return (
        <FocusElement
          id="publish-message__title"
          className={className}
          onInput={(e) => {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 © fudanfuhua

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100