- ee62d91: Bump focus-trap to v7.6.1
- 1738674: Bump focus-trap dependency to 7.6.0 for customizable ESC behavior (#1346)
- 850a5a0: Bump focus-trap to v7.5.4 for shadow DOM related bug fix
- 10dc372: Bump focus-trap to 7.5.3 for typings fix
- 1d58209: Bump focus-trap to v7.5.2 for Safari-related bug fix with
Array.findLast()
- e42bf28: Bump focus-trap to v7.5.1 for new positive tab index support in single-container traps
- c1d6324: Bump focus-trap to v7.4.3 for bug fix for (#962)
- b137dfa: Bump focus-trap to v7.4.2 for shadow DOM-related fix
- ada0709: Bump focus-trap to v7.4.1 and tabbable to v6.1.2 for nwsapi patch (#986).
- 65c508c: Bump focus-trap to v7.4.0 for new onPost/Pause and onPost/Unpause hooks via existing
focusTrapOptions
prop. (#948)
- 6c8f714: Bump focus-trap to v7.3.1 and tabbable to v6.1.1 for bug fixes and inert support.
- 0c98e74: Add missing trapStack option from focus-trap 7.1.0, add new isKeyForward and isKeyBackward options from focus-trap 7.2.0, bump focus-trap to 7.2.0.
- c772db0: Add help for Strict Mode in README #796
- d0de500: Bump focus-trap to 7.1.0 and tabbable to 6.0.1 for new trap features and bug fixes
- af69c14: 🚨 Breaking: Underlying
tabbable
dependency has been updated to v6.0.0 and contains a breaking change related to detached nodes with its defaultdisplayCheck
setting. See tabbable's changelog for more information.- The
focus-trap
dependency has also be updated to v7.0.0 but only contains the underlyingtabbable
changes. - The
tabbableOptions.displayCheck
prop type has been updated to include the new "legacy-full" option.
- The
- 018732c: 🚨 Breaking: Dropped support of IE browsers, all versions.
- IE11 was officially retired on June 15, 2022 (6 weeks ago). There are no longer any versions of IE that are still maintained or even supported by Microsoft.
- 018732c: Revised and clarified official browser support (still as broad and deep as reasonably possible).
- b0bbbd4: Update README with a note about the
children
prop stating that the trap requires a single child, and that if a component is used, it must be a functional component that forwards refs.
- 4d8e041: Fix an issue when running in strict mode which has React immediately unmount/remount the trap, causing it to deactivate and then have to reactivate (per existing component state) on the remount. #720
- 2d6cd9b: Add explicit dependency on tabbable since the source directly requires it.
- 4a77d87: Stop using the infamous
findDOMNode()
on providedcontainerElements
.- There seems to have been no good reason for this as this prop, if specified, is already required to be an array of HTMLElement references, which means these nodes have already been rendered (if they were once React elements). There appears to have been no remaining need for this API.
- Furthermore, the minimum supported version of React is now 16.3 as it technically has been for a while now since that is the version that introduced callback refs, which we've been using for quite some time now (so this bump will hopefully not cause any ripples).
- 9947461: Bump focus-trap dependency to v6.9.4 to get typings fix.
- 519e5a5: Fix setReturnFocus option as function not being passed node focused prior to activation.
- 7547d93: Bumps focus-trap to v6.9.3 to pick-up some small bug fixes from underlying tabbable.
- 040813a: Bumps focus-trap to v6.9.1 to pick-up a fix to tabbable in v5.3.2 regarding the
displayCheck=full
(default) option behavior that caused issues with detached nodes.
- 7495680: Bump focus-trap to v6.9.0 to get bug fixes and new features to help fix some bugs.
- 7495680: Fix onDeactivate, onPostDeactivate, and checkCanReturnFocus options not being called consistently on deactivation.
- 7495680: Fix focus not being allowed to remain on outside node post-deactivation when
clickOutsideDeactivates
is true or returns true.
- 659d44e: Bumps focus-trap to v6.8.1. The big new feature is opt-in Shadow DOM support in focus-trap (in tabbable), and new tabbable options exposed in a new
focusTrapOptions.tabbableOptions
configuration option.⚠️ This will likely break your tests if you're using JSDom (e.g. with Jest). See testing in JSDom for more info.
- 83e283c: Update focus-trap to v6.7.3 for bug fix related to elements with a negative
tabindex
.
- 3eb9421: Bump focus-trap to v6.7.2 for bug fix.
- 83097a5: Delay trap creation until it should be active. This is a change in behavior, however it should not break existing behavior. The delay now allows you to set
active=false
until you have thefocusTrapOptions
set correctly. #539
- 16d1ae1: Fix bug where global document was being accessed instead of first checking for
focusTrapOptions.document
option. #539
- 08a9449: Use
preventScroll
option on deactivation if returning focus.
- a2806a0: Fix SSR issues when accessing
document
object (#482)
- c8e46c2: Support new
document
option introduced in focus-trap v6.7.0 (#460) - 5ee587c: Bump focus-trap dependency to v6.7.1
- 111a27f: Update focus-trap to v6.6.1, to get tabbable at v5.2.1, to get bug fix for disabled fieldsets.
- 7fbe8ca: Update to support new features in
[email protected]
includinginitialFocus
which can now be false to prevent initial focus, andescapeDeactivates
which can now alternately be a function that returns a boolean instead of a straight boolean.
- 5292ae8:
- Adding support for new focus-trap options from focus-trap v6.5.0:
checkCanFocusTrap()
,onPostActivate()
,checkCanReturnFocus()
, andonPostDeactivate()
. - Adding support (bug fix) for existing focus-trap
setReturnFocus
option that had thus far been ignored, with focus-trap-react always returning focus to the previously-focused element prior to activation regardless of the use of thesetReturnFocus
option. The option is now respected the same as it is when using focus-trap directly.
- Adding support for new focus-trap options from focus-trap v6.5.0:
- 24704c7: Bump focus-trap dependency to 6.5.1 for bug fix to onPostDeactivate.
- b8d7071: Bump focus-trap dependency to 6.5.0 to get new features
- 6ee37fb: Bump focus-trap from 6.3.0 to 6.4.0. There should be no changes in behavior as a result of this upgrade.
- f9a6d1a: Throw an error if a Fragment is given as the child container (currently, it appears to work, but the trap is actually not activated because focus-trap can't find the DOM element for the Fragment "container"). (Fixes #268)
- a4c3105: Update PropTypes for clickOutsideDeactivates to match latest focus-trap.
- 8d58bc8: Bump focus-trap to v6.3.0
- 53fa056: Update
focus-trap
dependency to new patch release v6.2.2 for bug fix to multi-container traps.
- 5d70831: Bump focus-trap to 6.2.1 for bug fixes.
- c4e4837: Remove the need for a child, update typings, update docs:
- Remove the need for a child in
<FocusTrap />
whencontainerElements
is used. The child was already being ignored anyway (whencontainerElements
is used; if the prop is not used, then a single child is still required). - Update the typings related to the
children
prop to make it optional. Prop-types already hadchildren
as optional, however the use ofReact.Children.only()
in all cases was still forcing the presence of a single child. That's no longer the case. - Add additional notes about the use of the
containerElements
prop in the documentation.
- Remove the need for a child in
- 0836c6d: Fixing a bug where the focus trap may not have been set before it is unmounted #184
- 76ed007: Add ability to pass containerElements to focus-trap #179. This PR is made possible because of focus-trap/focus-trap#217 and the released version 6.2.0 of focus-trap.
- 925dfd2: Update the react and react-dom peer dependencies from
^16.0.0
to>=16.0.0
since this library works with React 17 as well as React 16. - 01653da: Fix focus not always returning to correct node after setting
active
prop tofalse
. #139 - 95f8ab6: Update focus-trap dependency from 6.1.2 to 6.1.4. Bug fixes only.
- 5994a8c: Bump focus-trap from 6.0.1 to 6.1.0. This new version of focus-trap provides a new
delayInitialFocus
flag that can be used to further customize trap behavior.
- 0562ef0: Change
prepublishOnly
script toprepare
script so that it also runs if someone installs the package directly from the git repo (e.g. from your work in which you fixed a bug or added a feature you're waiting to get merged to master and published to NPM).
- 513a2d3: BREAKING: Updated focus-trap dependency to new 6.0.1 release, which contains breaking changes. This update means it's also now using the latest version of tabbable, which also has breaking changes. See respective CHANGELOGs for details.
- 35040fa: Remove call for maintainers. @stefcameron and @maraisr hope to take up the charge. Additional help and contributors are most welcome for anyone interested!
- 513a2d3: Changed code formatting to use dangling commas where ES5 supports them.
- Fix: PropTypes definition now supports server-side rendering. #83
- Add: Prop types for
<FocusTrap>
. - Update:
focus-trap
dependency from 4.0.2 to 5.1.0 for the latest features/fixes it provides. #71 - BREAKING Update: Only React 16.0+ is supported going forward. #55
- BREAKING Update: All dependencies updated to their latest versions.
- Fix:
children
's type isReact.ReactNode
, notReact.ReactElement
. #66 - Fix: Allow mutable object refs to be used for FocusTrap child. #72
- Fix:
specifiedFocusTrapOptions.includes(optionName)
statement incomponentDidMount()
was causing an exception becauseincludes()
is not a function defined onObject
.
- Update focus-trap to 4.0.2, which includes a queue of traps, so when a trap is paused because another trap activates, it will be unpaused when that other trap deactivates. If Trap A was automatically paused because Trap B activated (existing behavior), when Trap B is deactivated Trap A will be automatically unpaused (new behavior).
- Fix TypeScript declarations.
- BREAKING:
<FocusTrap>
now expects exactly one child element which can be any HTML element or other React component that contains focusable elements. Thetag
prop has been removed, as has support for additional props that are passed through to thetag
, because it is no longer necessary: you should provide your own element, with whatever props you want, as a child of<FocusTrap>
.
- Fix bug that caused
returnFocusOnDeactivate: true
to be ignored when using theactive
prop to activate & deactivate the focus trap.
- Update focus-trap to 3.0.0, which includes a couple of behavior changes. The key change is that focus management has been changed so that you can include tricky focusable elements like radio groups, iframes, and shadow DOM components in your trap — as long as the first and last focusable elements in the trap can still be detected by Tabbable.
- An effect of this change is that positive tabindexes are no longer guaranteed to work as expected. You should avoid these.
- Re-add TypeScript declarations.
- Remove
componentWillMount
usage.
- Fix TypeScript declarations so props are available on the imported namespace.
- Fix React import in TypeScript declarations.
- Add TypeScript declarations.
- Prevent error in IE edge cases when the previously focused element does not have a
focus()
function.
- Allow React v16 peer dependency.
- Introduce
dist/focus-trap-react.js
, wheresrc/
now compiles to, since React 15.5+ demandsclass
es, so Babel-compilation. Which is actually a huge overhaul, though in semver it's just a patch.
- Fix handling of
focusTrapOptions.returnFocusOnDeactivate
for React-specific kinks likeautoFocus
on inputs.
- Upgrade
focus-trap
for important bug fix.
- Introduce
focusTrapOptions
prop (and remove redundancies). - Upgrade to
focus-trap
v2.
- Allow React 15 as peer dependency.
- Upgrade
focus-trap
to addescapeDeactivates
andclickOutsideDeactivates
props. - Allow arbitrary props passed through to the element itself.
- Move
react
topeerDependencies
and removereact-dom
dependency.
- Upgrade to React 0.14 and its companion ReactDOM.
- Initial release.