Skip to content

Commit 89106a5

Browse files
committed
1 parent c1fcd3a commit 89106a5

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/dist/esm/components/modal/CModal.js b/dist/esm/components/modal/CModal.js
2+
index 58f4c61c71168a624a9c0d79318dad9993e3d2aa..315befe3e56de29738642d573253833085d87409 100644
3+
--- a/dist/esm/components/modal/CModal.js
4+
+++ b/dist/esm/components/modal/CModal.js
5+
@@ -30,14 +30,14 @@ var CModal = forwardRef(function (_a, ref) {
6+
var _a;
7+
if (_visible) {
8+
activeElementRef.current = document.activeElement;
9+
- document.addEventListener('mouseup', handleClickOutside);
10+
+ document.addEventListener('mousedown', handleMouseDown);
11+
document.addEventListener('keydown', handleKeyDown);
12+
}
13+
else {
14+
(_a = activeElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
15+
}
16+
return function () {
17+
- document.removeEventListener('mouseup', handleClickOutside);
18+
+ document.removeEventListener('mousedown', handleMouseDown);
19+
document.removeEventListener('keydown', handleKeyDown);
20+
};
21+
}, [_visible]);
22+
@@ -85,6 +85,9 @@ var CModal = forwardRef(function (_a, ref) {
23+
handleDismiss();
24+
}
25+
};
26+
+ var handleMouseDown = function (event) {
27+
+ document.addEventListener('mouseup', function () { handleClickOutside(event) }, { once: true })
28+
+ }
29+
var handleKeyDown = function (event) {
30+
if (event.key === 'Escape' && keyboard) {
31+
handleDismiss();

webui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dependencies": {
77
"@companion-app/shared": "*",
88
"@coreui/coreui": "^5.1.2",
9-
"@coreui/react": "^5.3.0",
9+
"@coreui/react": "patch:@coreui/react@npm%3A5.4.0#~/.yarn/patches/@coreui-react-npm-5.4.0-6fcb3b510a.patch",
1010
"@fontsource/fira-code": "^5.0.20",
1111
"@fontsource/roboto": "^5.0.15",
1212
"@fortawesome/fontawesome-svg-core": "^6.6.0",

yarn.lock

+21-7
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ __metadata:
14921492
dependencies:
14931493
"@companion-app/shared": "npm:*"
14941494
"@coreui/coreui": "npm:^5.1.2"
1495-
"@coreui/react": "npm:^5.3.0"
1495+
"@coreui/react": "patch:@coreui/react@npm%3A5.4.0#~/.yarn/patches/@coreui-react-npm-5.4.0-6fcb3b510a.patch"
14961496
"@fontsource/fira-code": "npm:^5.0.20"
14971497
"@fontsource/roboto": "npm:^5.0.15"
14981498
"@fortawesome/fontawesome-svg-core": "npm:^6.6.0"
@@ -1590,7 +1590,7 @@ __metadata:
15901590
languageName: node
15911591
linkType: hard
15921592

1593-
"@coreui/coreui@npm:^5.1.0, @coreui/coreui@npm:^5.1.2":
1593+
"@coreui/coreui@npm:^5.1.2":
15941594
version: 5.1.2
15951595
resolution: "@coreui/coreui@npm:5.1.2"
15961596
peerDependencies:
@@ -1599,17 +1599,31 @@ __metadata:
15991599
languageName: node
16001600
linkType: hard
16011601

1602-
"@coreui/react@npm:^5.3.0":
1603-
version: 5.3.0
1604-
resolution: "@coreui/react@npm:5.3.0"
1602+
"@coreui/react@npm:5.4.0":
1603+
version: 5.4.0
1604+
resolution: "@coreui/react@npm:5.4.0"
1605+
dependencies:
1606+
"@coreui/coreui": "npm:^5.1.2"
1607+
"@popperjs/core": "npm:^2.11.8"
1608+
prop-types: "npm:^15.8.1"
1609+
peerDependencies:
1610+
react: ">=17"
1611+
react-dom: ">=17"
1612+
checksum: 10c0/0989cb36e2f400110b255ecbf4bfea5ee9d4ff8435a0271c6b67b023d9285b402f0c3eb7d7095f0005d5436ec83f5ffa1efe0c8524af8509c2e0be77797517b0
1613+
languageName: node
1614+
linkType: hard
1615+
1616+
"@coreui/react@patch:@coreui/react@npm%3A5.4.0#~/.yarn/patches/@coreui-react-npm-5.4.0-6fcb3b510a.patch":
1617+
version: 5.4.0
1618+
resolution: "@coreui/react@patch:@coreui/react@npm%3A5.4.0#~/.yarn/patches/@coreui-react-npm-5.4.0-6fcb3b510a.patch::version=5.4.0&hash=56767e"
16051619
dependencies:
1606-
"@coreui/coreui": "npm:^5.1.0"
1620+
"@coreui/coreui": "npm:^5.1.2"
16071621
"@popperjs/core": "npm:^2.11.8"
16081622
prop-types: "npm:^15.8.1"
16091623
peerDependencies:
16101624
react: ">=17"
16111625
react-dom: ">=17"
1612-
checksum: 10c0/6d7904706e4751a1f2e23f97878294415fdcccee996fc119f629c9c629436c89d612dc3b55b17982fc96a5a2126600bde00c4ae5b7b6d2aa50b0c7c9874d0461
1626+
checksum: 10c0/d05537106c03eeeb39d1f21a80fa695c82ed12f1235c99475fc8cdbf6f361951d072e5eb80632d39e6c8dab6c8280ce146269b43a2c9d791b41503d5da561dda
16131627
languageName: node
16141628
linkType: hard
16151629

0 commit comments

Comments
 (0)