@atlaskit/editor-core 187.3.4 → 187.3.5
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 +6 -0
- package/dist/cjs/ui/Addon/click-area-helper.js +4 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/ui/Addon/click-area-helper.js +4 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/ui/Addon/click-area-helper.js +4 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/Addon/click-area-helper.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f10d32545d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f10d32545d2) - Fix bug where clicking anything in column picker inside Datasource table triggers editor focus toggling
|
|
8
|
+
|
|
3
9
|
## 187.3.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -74,12 +74,15 @@ var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
|
|
|
74
74
|
var isButtonClicked = Boolean((0, _dom.closestElement)(event.currentTarget, 'button')) || Boolean((0, _dom.closestElement)(target, 'button')) || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.nodeName) === 'BUTTON' || target.nodeName === 'BUTTON';
|
|
75
75
|
var isTargetInsideContentArea = Boolean(isTargetChildOfContentArea);
|
|
76
76
|
var isBetweenContentAreaAndEditableContent = isTargetInsideContentArea && !isTargetInsideEditableArea;
|
|
77
|
+
|
|
78
|
+
// Column Picker dropdown in Datasources table
|
|
79
|
+
var isDatasourcePopupClicked = !!(target !== null && target !== void 0 && target.closest('#column-picker-popup'));
|
|
77
80
|
var edgeCaseScenario1 = (isBetweenContentAreaAndEditableContent || !isEventComingFromContentArea) && !isEditorFocused;
|
|
78
81
|
var edgeCaseScenario2 = !isTargetInsideContentArea && isEditorFocused;
|
|
79
82
|
var edgeCaseScenario3 = isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
80
83
|
var edgeCaseScenario4 = isEventComingFromContentArea && !isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
81
84
|
var edgeCases = edgeCaseScenario1 || edgeCaseScenario2 || edgeCaseScenario3 || edgeCaseScenario4;
|
|
82
|
-
var isClickOutsideEditor = edgeCases && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
85
|
+
var isClickOutsideEditor = edgeCases && !isDatasourcePopupClicked && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
83
86
|
|
|
84
87
|
// click was within editor container and focus should be brought to input
|
|
85
88
|
if (isClickOutsideEditor && view) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.3.
|
|
9
|
+
var version = "187.3.5";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -68,12 +68,15 @@ const clickAreaClickHandler = (view, event) => {
|
|
|
68
68
|
const isButtonClicked = Boolean(closestElement(event.currentTarget, 'button')) || Boolean(closestElement(target, 'button')) || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.nodeName) === 'BUTTON' || target.nodeName === 'BUTTON';
|
|
69
69
|
const isTargetInsideContentArea = Boolean(isTargetChildOfContentArea);
|
|
70
70
|
const isBetweenContentAreaAndEditableContent = isTargetInsideContentArea && !isTargetInsideEditableArea;
|
|
71
|
+
|
|
72
|
+
// Column Picker dropdown in Datasources table
|
|
73
|
+
const isDatasourcePopupClicked = !!(target !== null && target !== void 0 && target.closest('#column-picker-popup'));
|
|
71
74
|
const edgeCaseScenario1 = (isBetweenContentAreaAndEditableContent || !isEventComingFromContentArea) && !isEditorFocused;
|
|
72
75
|
const edgeCaseScenario2 = !isTargetInsideContentArea && isEditorFocused;
|
|
73
76
|
const edgeCaseScenario3 = isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
74
77
|
const edgeCaseScenario4 = isEventComingFromContentArea && !isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
75
78
|
const edgeCases = edgeCaseScenario1 || edgeCaseScenario2 || edgeCaseScenario3 || edgeCaseScenario4;
|
|
76
|
-
const isClickOutsideEditor = edgeCases && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
79
|
+
const isClickOutsideEditor = edgeCases && !isDatasourcePopupClicked && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
77
80
|
|
|
78
81
|
// click was within editor container and focus should be brought to input
|
|
79
82
|
if (isClickOutsideEditor && view) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -68,12 +68,15 @@ var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
|
|
|
68
68
|
var isButtonClicked = Boolean(closestElement(event.currentTarget, 'button')) || Boolean(closestElement(target, 'button')) || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.nodeName) === 'BUTTON' || target.nodeName === 'BUTTON';
|
|
69
69
|
var isTargetInsideContentArea = Boolean(isTargetChildOfContentArea);
|
|
70
70
|
var isBetweenContentAreaAndEditableContent = isTargetInsideContentArea && !isTargetInsideEditableArea;
|
|
71
|
+
|
|
72
|
+
// Column Picker dropdown in Datasources table
|
|
73
|
+
var isDatasourcePopupClicked = !!(target !== null && target !== void 0 && target.closest('#column-picker-popup'));
|
|
71
74
|
var edgeCaseScenario1 = (isBetweenContentAreaAndEditableContent || !isEventComingFromContentArea) && !isEditorFocused;
|
|
72
75
|
var edgeCaseScenario2 = !isTargetInsideContentArea && isEditorFocused;
|
|
73
76
|
var edgeCaseScenario3 = isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
74
77
|
var edgeCaseScenario4 = isEventComingFromContentArea && !isTargetContentArea && !isTargetInsideContentArea && !isEditorFocused;
|
|
75
78
|
var edgeCases = edgeCaseScenario1 || edgeCaseScenario2 || edgeCaseScenario3 || edgeCaseScenario4;
|
|
76
|
-
var isClickOutsideEditor = edgeCases && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
79
|
+
var isClickOutsideEditor = edgeCases && !isDatasourcePopupClicked && !isEventComingFromInlineCommentPopup && !isButtonClicked && !isInputClicked && !isTextAreaClicked && !isPopupClicked && !isBreadcrumbClicked && !isEditorPopupTextSelected && checkForModal(target);
|
|
77
80
|
|
|
78
81
|
// click was within editor container and focus should be brought to input
|
|
79
82
|
if (isClickOutsideEditor && view) {
|
package/dist/esm/version.json
CHANGED