- Breaking (kind of): Update Tabbable to detect more elements and be more careful with radio buttons (see Tabbable's changelog).
- Breaking (kind of): If
clickOutsideDeactivatesandreturnFocusOnDeactivateare bothtrue, focus will be returned to the pre-trap element only if the clicked element is not focusable.
- Add slight delay before moving focus to the first element in the trap. This should prevent an occasional bug caused when the first element in the trap will close the trap if it picks up on the event that triggered the trap's opening.
- Fix
"main"field inpackage.json.
- Publish UMD build so people can download it from
unpkg.com.
- Fixed: TypeScript signature for
activatefunction.
- Added: TypeScript declaration file.
- Fixed: Activation does not re-focus already-focused node.
- Fixed: Tabbing works as expected when initially focused Node has a negative
tabindexand is in the middle of other tabbable elements.
- Added:
initialFocusandfallbackFocusoptions can take functions that return DOM nodes. - Fixed:
pauseandunpausecannot accidentally add extra event listeners.
- Added/fixed, depending on your perspective: If focus is already inside the focus trap when it is activated, leave focus where it is instead of forcing it to the first tabbable node or
initialFocus.
- Added:
fallbackFocusoption.
- Fixed:
clickOutsideDeactivatesno longer triggers deactivation when you click inside the trap.
- Fix bug when activating multiple focus traps.
- Rewrote the thing, altering the API. Read the new docs please.
- Update
tabbableto fix handling of traps with changing contents.
- Improve
clickOutsideDeactivatesfunctionality.
- Add
clickOutsideDeactivatesoption. - Add
escapeDeactivatesoption.
- Make sure to
select()<input>elements when they receive focus via tab.
- Fix buggy attempts to focus nodes that don't exist.
- Initial release.