@rc-component/portal 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ export let stack = []; // export for testing
6
6
  export default function useEscKeyDown(open, onEsc) {
7
7
  const id = useId();
8
8
  const handleEscKeyDown = useEvent(event => {
9
- if (event.key === 'Escape') {
9
+ if (event.key === 'Escape' && !event.isComposing) {
10
10
  const top = stack[stack.length - 1] === id;
11
11
  onEsc?.({
12
12
  top,
@@ -14,7 +14,7 @@ let stack = exports.stack = []; // export for testing
14
14
  function useEscKeyDown(open, onEsc) {
15
15
  const id = (0, _useId.default)();
16
16
  const handleEscKeyDown = (0, _util.useEvent)(event => {
17
- if (event.key === 'Escape') {
17
+ if (event.key === 'Escape' && !event.isComposing) {
18
18
  const top = stack[stack.length - 1] === id;
19
19
  onEsc?.({
20
20
  top,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/portal",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "React Portal Component",
5
5
  "keywords": [
6
6
  "react",