npm.io
1.0.3 • Published 8 years ago

react-input-fixer

Licence
MIT
Version
1.0.3
Deps
0
Vulns
0
Weekly
0
Stars
2

react-input-fixer for React

npm version

Provides a workaround for phantom blur/focus events for HTML inputs in Safari MacOS. The bug this code fixes is described in a WebKit bug/Radar and React bug.

For details of the original problem and code, see the Vanilla JS version.

Usage

The <FixedInput ... /> directly replaces a regular <input ... /> and fixes Safari's event mangling.

import FixedInput from './FixedInput'

…
  render() {
    return <FixedInput ... />
  }
…

Keywords