@workday/canvas-kit-react 5.3.13 → 5.3.14
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.
|
@@ -14,7 +14,7 @@ exports.usePopupTarget = common_1.createHook(function (_a, ref) {
|
|
|
14
14
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
15
15
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
16
16
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
17
|
-
if (!state.targetRef.current) {
|
|
17
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
18
18
|
state.targetRef.current = event.currentTarget;
|
|
19
19
|
}
|
|
20
20
|
if (state.visibility !== 'hidden') {
|
|
@@ -12,7 +12,7 @@ export var usePopupTarget = createHook(function (_a, ref) {
|
|
|
12
12
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
13
13
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
14
14
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
15
|
-
if (!state.targetRef.current) {
|
|
15
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
16
16
|
state.targetRef.current = event.currentTarget;
|
|
17
17
|
}
|
|
18
18
|
if (state.visibility !== 'hidden') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.14",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"@popperjs/core": "^2.5.4",
|
|
59
59
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
60
60
|
"@workday/canvas-depth-web": "^0.16.4",
|
|
61
|
-
"@workday/canvas-kit-labs-react": "^5.3.
|
|
62
|
-
"@workday/canvas-kit-popup-stack": "^5.3.
|
|
63
|
-
"@workday/canvas-kit-preview-react": "^5.3.
|
|
61
|
+
"@workday/canvas-kit-labs-react": "^5.3.14",
|
|
62
|
+
"@workday/canvas-kit-popup-stack": "^5.3.14",
|
|
63
|
+
"@workday/canvas-kit-preview-react": "^5.3.14",
|
|
64
64
|
"@workday/canvas-system-icons-web": "1.0.41",
|
|
65
65
|
"@workday/design-assets-types": "^0.2.4",
|
|
66
66
|
"chroma-js": "^2.1.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"@workday/canvas-accent-icons-web": "^1.0.0",
|
|
78
78
|
"@workday/canvas-applet-icons-web": "^0.17.50"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "44781cf7508bbc639bae9875863df942a0065731"
|
|
81
81
|
}
|
|
@@ -13,7 +13,7 @@ export const usePopupTarget = createHook(({events, state}: PopupModel, ref) => {
|
|
|
13
13
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
14
14
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
15
15
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
16
|
-
if (!state.targetRef.current) {
|
|
16
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
17
17
|
(state.targetRef as React.MutableRefObject<any>).current = event.currentTarget;
|
|
18
18
|
}
|
|
19
19
|
|