@atlaskit/popup 4.4.5 → 4.5.0

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,20 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 4.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0e417a8c4a92e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0e417a8c4a92e) -
8
+ Popup will now stay open when a click starts inside the popup but then moves outside the popup.
9
+ The `onClose` callback will not be called in this case. This aligns it with the behaviour of Modal
10
+ Dialog.
11
+
12
+ This change was previously behind a feature flag, which has now been removed.
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 4.4.5
4
19
 
5
20
  ### Patch Changes
@@ -90,7 +90,7 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
90
90
  var isClickOnPopup = popupRef && popupRef.contains(target);
91
91
  var isClickOnTrigger = triggerRef && triggerRef.contains(target);
92
92
  var didClickStartInsidePopup = popupRef && mouseDownTarget.current instanceof Node && popupRef.contains(mouseDownTarget.current);
93
- if (!isClickOnPopup && !isClickOnTrigger && ((0, _platformFeatureFlags.fg)('popup-onclose-fix-mouse-down-inside-popup') ? !didClickStartInsidePopup : true)) {
93
+ if (!isClickOnPopup && !isClickOnTrigger && !didClickStartInsidePopup) {
94
94
  closePopup(event);
95
95
  // If there was an outside click on a non-interactive element, the focus should be on the trigger.
96
96
  if (document.activeElement && !(0, _isElementInteractive.isInteractiveElement)(document.activeElement) && (0, _platformFeatureFlags.fg)('platform_dst_popup-disable-focuslock')) {
@@ -87,7 +87,7 @@ export const useCloseManager = ({
87
87
  const isClickOnPopup = popupRef && popupRef.contains(target);
88
88
  const isClickOnTrigger = triggerRef && triggerRef.contains(target);
89
89
  const didClickStartInsidePopup = popupRef && mouseDownTarget.current instanceof Node && popupRef.contains(mouseDownTarget.current);
90
- if (!isClickOnPopup && !isClickOnTrigger && (fg('popup-onclose-fix-mouse-down-inside-popup') ? !didClickStartInsidePopup : true)) {
90
+ if (!isClickOnPopup && !isClickOnTrigger && !didClickStartInsidePopup) {
91
91
  closePopup(event);
92
92
  // If there was an outside click on a non-interactive element, the focus should be on the trigger.
93
93
  if (document.activeElement && !isInteractiveElement(document.activeElement) && fg('platform_dst_popup-disable-focuslock')) {
@@ -82,7 +82,7 @@ export var useCloseManager = function useCloseManager(_ref) {
82
82
  var isClickOnPopup = popupRef && popupRef.contains(target);
83
83
  var isClickOnTrigger = triggerRef && triggerRef.contains(target);
84
84
  var didClickStartInsidePopup = popupRef && mouseDownTarget.current instanceof Node && popupRef.contains(mouseDownTarget.current);
85
- if (!isClickOnPopup && !isClickOnTrigger && (fg('popup-onclose-fix-mouse-down-inside-popup') ? !didClickStartInsidePopup : true)) {
85
+ if (!isClickOnPopup && !isClickOnTrigger && !didClickStartInsidePopup) {
86
86
  closePopup(event);
87
87
  // If there was an outside click on a non-interactive element, the focus should be on the trigger.
88
88
  if (document.activeElement && !isInteractiveElement(document.activeElement) && fg('platform_dst_popup-disable-focuslock')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "4.4.5",
3
+ "version": "4.5.0",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,11 +34,11 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/css": "^0.15.0",
36
36
  "@atlaskit/ds-lib": "^5.1.0",
37
- "@atlaskit/layering": "^3.1.0",
37
+ "@atlaskit/layering": "^3.2.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/popper": "^7.1.0",
40
40
  "@atlaskit/portal": "^5.1.0",
41
- "@atlaskit/primitives": "^16.0.0",
41
+ "@atlaskit/primitives": "^16.1.0",
42
42
  "@atlaskit/tokens": "^7.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@compiled/react": "^0.18.6",
@@ -56,18 +56,18 @@
56
56
  "@af/integration-testing": "workspace:^",
57
57
  "@af/visual-regression": "workspace:^",
58
58
  "@atlaskit/button": "^23.5.0",
59
- "@atlaskit/code": "^17.2.0",
59
+ "@atlaskit/code": "^17.3.0",
60
60
  "@atlaskit/docs": "^11.2.0",
61
61
  "@atlaskit/form": "^14.2.0",
62
62
  "@atlaskit/heading": "^5.2.0",
63
63
  "@atlaskit/icon": "^28.5.0",
64
64
  "@atlaskit/link": "^3.2.0",
65
- "@atlaskit/modal-dialog": "^14.5.0",
66
- "@atlaskit/section-message": "^8.7.0",
65
+ "@atlaskit/modal-dialog": "^14.6.0",
66
+ "@atlaskit/section-message": "^8.8.0",
67
67
  "@atlaskit/ssr": "workspace:^",
68
68
  "@atlaskit/textfield": "^8.0.0",
69
69
  "@atlaskit/toggle": "^15.1.0",
70
- "@atlassian/feature-flags-test-utils": "^0.3.0",
70
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
71
71
  "@atlassian/ssr-tests": "^0.3.0",
72
72
  "@testing-library/react": "^13.4.0",
73
73
  "@testing-library/react-hooks": "^8.0.1",
@@ -117,9 +117,6 @@
117
117
  },
118
118
  "popup-onclose-fix": {
119
119
  "type": "boolean"
120
- },
121
- "popup-onclose-fix-mouse-down-inside-popup": {
122
- "type": "boolean"
123
120
  }
124
121
  },
125
122
  "homepage": "https://atlassian.design/components/popup/"