• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

react-ui-org / react-ui / 12744940249

13 Jan 2025 10:09AM UTC coverage: 80.471% (-11.5%) from 91.979%
12744940249

Pull #544

github

web-flow
Merge ec8d690d5 into 684d5abff
Pull Request #544: Re-implement `Modal` component using HTMLDialogElement (#461)

743 of 923 branches covered (80.5%)

Branch coverage included in aggregate %.

4 of 43 new or added lines in 7 files covered. (9.3%)

65 existing lines in 5 files now uncovered.

658 of 818 relevant lines covered (80.44%)

61.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.67
/src/components/Modal/_helpers/dialogOnKeyDownHandler.js
1
export const dialogOnKeyDownHandler = (
4✔
2
  e,
3
  closeButtonRef,
4
  allowCloseOnEscapeKey,
5
) => {
6
  // When `allowCloseOnEscapeKey` is set to `false`, prevent closing the modal using the Escape key.
NEW
7
  if (
×
8
    e.key === 'Escape'
×
9
    && !allowCloseOnEscapeKey
10
  ) {
NEW
11
    e.preventDefault();
×
12
  }
13

14
  // When the close button is disabled, prevent closing the modal using the Escape key.
NEW
15
  if (
×
16
    e.key === 'Escape'
×
17
    && closeButtonRef?.current != null
18
    && closeButtonRef?.current?.disabled === true
19
  ) {
NEW
20
    e.preventDefault();
×
21
  }
22
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc