NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4938 most downloaded on npm
It is a trap! (for a focus)
Last release 10 months ago
29 Nov 2025
Release timing varies
gaps range from 8 days to 10 months
Most releases are documented
notes for 38 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
9 years old
111 releases · first in 2017
correct Context instability leading to hydration failure (#388, #377)
enforce react 19 compatible dependencies
One column per quarter.
correct focus order for non-autofocusable modals, fixes #340
Nothing published for this version
### Bug Fixes * code; (e4acec6) ### Features * refactor: use name imports;
### Bug Fixes * expose ReactFocusLockProps
retore d.ts generation, fixes #325
This release changes the way focus is managed in some edge cases:
This release changes the way focus is managed in some edge cases:
Nothing published for this version
thanks to @wojtekmaj React-Focus-Lock is now "ESM Compatible"
Nothing published for this version
correct typescript definitions for focus helpers
Nothing published for this version
speedup resolution for auto-guards
Nothing published for this version
improve focus-lock behavior for exotic components
Nothing published for this version
Nothing published for this version
correct crossframe behavior for Safary, fixes #249
update focus-lock to prevent error when accessing cross-origin frames. fixes #241
Nothing published for this version
suppress ref warning for host nodes, fixes #123
tremendous job by @vbabel enabled more complete Shadow DOM support
correct shadow-dom specification, fixes #188
disable positive index guard by default; use hasPositiveIndices to control behavior, fixes #32
Nothing published for this version
allow returnFocus to be garbage collected, fixes #173
update underlying libraries to incorporate React 17 requirements
update focus-lock to speedup lock activation
Nothing published for this version
Restore IE11 support without polyfills - https://github.com/theKashey/react-focus-lock/issues/111
tabIndex=-1 elements should be autofocusable if pointed, fixes #108
correct behavior for radio buttons at the edge of lock, fixes #103
use forwardRef, and allow custom as prop
use forwardRef, and allow custom as prop
# 2.1.0 (2019-09-13)
Nothing published for this version
Nothing published for this version
Nothing published for this version
onActivation hooks not called in v2
Nothing published for this version
React 16.8 is now required, nothing else changed, nothing else added
React 16.8 is now required, nothing else changed, nothing else added
No new features.
👉60% Bundle Size decrease*
if you want
After getting some complaints about the size of this library(almost 4kb), I've spent some time trying to solve named issue. And partially solved it - literally by splitting the code into to parts.
sidecar pattern has been used to split library code into the UI part(1.5kb), and Effect part(2.6kb) part, which would be executed only after Lock activation.Even if 2.6kb might be not enough to put sidecar into the separate chunk - the code with it, which may be bundled among the UI part, would not be executed before the time, reducing script execution time.
import FocusLockUI from 'react-focus-lock/UI - a DOM part of a lock.import Sidecar from 'react-focus-lock/sidecar - which is the real focus lock.import FocusLockUI from "react-focus-lock/UI";
import {sidecar} from "use-sidecar";
// prefetch sidecar. data would be loaded, but js would not be executed
const FocusLockSidecar = sidecar(
() => import(/* webpackPrefetch: true */ "react-focus-lock/sidecar")
);
<FocusLockUI
disabled={this.state.disabled}
sideCar={FocusLockSidecar}
>
{content}
</FocusLockUI>
Probably that's not the easiest way to use this lib, but - just extract this code somewhere, thus abstract from the implementation details. 2.6kb here, 4kb there - that's how we are going to win.
Nothing published for this version
# 1.19.0 (2019-04-22) ### Bug Fixes * infinite loop on ref set (29e9691) ### Features * no tail guard
Nothing published for this version
simplify proptype for shards, fixes #59
### Bug Fixes * use only auto guards
### Bug Fixes * support old refs (8b87c2f) # 1.18.0 (2019-03-10) ### Features * introduce shards
Nothing published for this version
### Bug Fixes * nested portals
Nothing published for this version
initially disabled buttons with tabindex set, #50
Nothing published for this version
Nothing published for this version
Nothing published for this version
# 1.17.0 (2018-10-26)
Your coding agent can read these notes before it upgrades. Set up the MCP server →