@atlaskit/popup 1.23.1 → 1.23.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 1.23.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#134766](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134766)
|
|
8
|
+
[`56e1c0d98f0c2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/56e1c0d98f0c2) -
|
|
9
|
+
Fixed unnecessary closing of modal dialogs that opened from a popup.
|
|
10
|
+
|
|
3
11
|
## 1.23.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -60,17 +60,9 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
60
60
|
if (!doesDomNodeExist) {
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
if ((
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
if (isLayerDisabled()) {
|
|
71
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
63
|
+
if (isLayerDisabled()) {
|
|
64
|
+
//if it is a disabled layer, we need to disable its click listener.
|
|
65
|
+
return;
|
|
74
66
|
}
|
|
75
67
|
var isClickOnPopup = popupRef && popupRef.contains(target);
|
|
76
68
|
var isClickOnTrigger = triggerRef && triggerRef.contains(target);
|
|
@@ -103,7 +95,7 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
103
95
|
return;
|
|
104
96
|
}
|
|
105
97
|
if (key === 'Tab') {
|
|
106
|
-
var _document$
|
|
98
|
+
var _document$activeEleme;
|
|
107
99
|
// We have cases where we need to close the Popup on Tab press.
|
|
108
100
|
// Example: DropdownMenu
|
|
109
101
|
if (shouldCloseOnTab) {
|
|
@@ -113,7 +105,7 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
113
105
|
closePopup(event);
|
|
114
106
|
return;
|
|
115
107
|
}
|
|
116
|
-
if (isLayerDisabled() && (_document$
|
|
108
|
+
if (isLayerDisabled() && (_document$activeEleme = document.activeElement) !== null && _document$activeEleme !== void 0 && _document$activeEleme.closest('[aria-modal]')) {
|
|
117
109
|
return;
|
|
118
110
|
}
|
|
119
111
|
if (shouldDisableFocusTrap) {
|
|
@@ -57,17 +57,9 @@ export const useCloseManager = ({
|
|
|
57
57
|
if (!doesDomNodeExist) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
if (isLayerDisabled()) {
|
|
68
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
60
|
+
if (isLayerDisabled()) {
|
|
61
|
+
//if it is a disabled layer, we need to disable its click listener.
|
|
62
|
+
return;
|
|
71
63
|
}
|
|
72
64
|
const isClickOnPopup = popupRef && popupRef.contains(target);
|
|
73
65
|
const isClickOnTrigger = triggerRef && triggerRef.contains(target);
|
|
@@ -102,7 +94,7 @@ export const useCloseManager = ({
|
|
|
102
94
|
return;
|
|
103
95
|
}
|
|
104
96
|
if (key === 'Tab') {
|
|
105
|
-
var _document$
|
|
97
|
+
var _document$activeEleme;
|
|
106
98
|
// We have cases where we need to close the Popup on Tab press.
|
|
107
99
|
// Example: DropdownMenu
|
|
108
100
|
if (shouldCloseOnTab) {
|
|
@@ -112,7 +104,7 @@ export const useCloseManager = ({
|
|
|
112
104
|
closePopup(event);
|
|
113
105
|
return;
|
|
114
106
|
}
|
|
115
|
-
if (isLayerDisabled() && (_document$
|
|
107
|
+
if (isLayerDisabled() && (_document$activeEleme = document.activeElement) !== null && _document$activeEleme !== void 0 && _document$activeEleme.closest('[aria-modal]')) {
|
|
116
108
|
return;
|
|
117
109
|
}
|
|
118
110
|
if (shouldDisableFocusTrap) {
|
|
@@ -52,17 +52,9 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
52
52
|
if (!doesDomNodeExist) {
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
if (isLayerDisabled()) {
|
|
63
|
-
//if it is a disabled layer, we need to disable its click listener.
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
55
|
+
if (isLayerDisabled()) {
|
|
56
|
+
//if it is a disabled layer, we need to disable its click listener.
|
|
57
|
+
return;
|
|
66
58
|
}
|
|
67
59
|
var isClickOnPopup = popupRef && popupRef.contains(target);
|
|
68
60
|
var isClickOnTrigger = triggerRef && triggerRef.contains(target);
|
|
@@ -95,7 +87,7 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
95
87
|
return;
|
|
96
88
|
}
|
|
97
89
|
if (key === 'Tab') {
|
|
98
|
-
var _document$
|
|
90
|
+
var _document$activeEleme;
|
|
99
91
|
// We have cases where we need to close the Popup on Tab press.
|
|
100
92
|
// Example: DropdownMenu
|
|
101
93
|
if (shouldCloseOnTab) {
|
|
@@ -105,7 +97,7 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
105
97
|
closePopup(event);
|
|
106
98
|
return;
|
|
107
99
|
}
|
|
108
|
-
if (isLayerDisabled() && (_document$
|
|
100
|
+
if (isLayerDisabled() && (_document$activeEleme = document.activeElement) !== null && _document$activeEleme !== void 0 && _document$activeEleme.closest('[aria-modal]')) {
|
|
109
101
|
return;
|
|
110
102
|
}
|
|
111
103
|
if (shouldDisableFocusTrap) {
|