Skip to content

Commit

Permalink
STCOM-1332 assign modal escape key handler to modal element rather th…
Browse files Browse the repository at this point in the history
…an document (#2389)

(cherry picked from commit 2f43c1c)
  • Loading branch information
JohnC-80 authored and zburke committed Nov 15, 2024
1 parent 1b6697b commit 650986d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Change history for stripes-components

## 12.2.5 IN PROGRESS

* Assign `<Modal>`'s exit key handler to Modal's element rather than `document`. refs STCOM-1382.

## [12.2.4](https://github.com/folio-org/stripes-components/tree/v12.2.4) (2024-11-08)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.2.3...v12.2.4)

* Pin `currency-codes` to `v2.1.0` to avoid duplicate entries in `v2.2.0`. Refs STCOM-1379.
* Bump `stripes-react-hotkeys` to `v3.2.0` for compatibility with `findDOMNode()` changes. STCOM-1343.
* Selection should occupy the full width of its container. Refs STCOM-1332.

## [12.2.3](https://github.com/folio-org/stripes-components/tree/v12.2.3) (2024-10-31)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.2.2...v12.2.3)
Expand Down
2 changes: 1 addition & 1 deletion lib/Modal/WrappingElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const WrappingElement = forwardRef(({
focusTrapRef.current.activate();
ATTrap.apply();
}
keyDownHandlerRef.current = listen(document, 'keydown', keyDownHandler);
keyDownHandlerRef.current = listen(modalElementRef.current, 'keydown', keyDownHandler);
focusHandlerRef.current = listen(document, 'focus', enforceFocusTimeout, true);
onOpen();
}
Expand Down

0 comments on commit 650986d

Please sign in to comment.