@atlaskit/editor-core 164.0.2 → 164.0.3
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/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/editor/package.json +1 -0
- package/element-browser/package.json +1 -0
- package/extensibility/package.json +1 -0
- package/extensions/package.json +1 -0
- package/labs-next/package.json +1 -0
- package/messages/package.json +1 -0
- package/package.json +1 -1
- package/test-utils/package.json +1 -0
- package/version-wrapper/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 164.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1f18014c3c3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f18014c3c3) - [ux] ED-14909: Fix Chrome bug where typeahead would write duplicate slash prefix triggers on multiple focusout events
|
|
8
|
+
|
|
3
9
|
## 164.0.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -201,12 +201,24 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
var onFocusOut = function onFocusOut(event) {
|
|
204
|
+
var _window$getSelection;
|
|
205
|
+
|
|
204
206
|
var relatedTarget = event.relatedTarget; // Given the user is changing the focus
|
|
205
207
|
// When the target is inside the TypeAhead Popup
|
|
206
208
|
// Then the popup should stay open
|
|
207
209
|
|
|
208
210
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(".".concat(_constants.TYPE_AHEAD_POPUP_CONTENT_CLASS))) {
|
|
209
211
|
return;
|
|
212
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
213
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
214
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
215
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
216
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
217
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
if (_utils.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
221
|
+
return;
|
|
210
222
|
}
|
|
211
223
|
|
|
212
224
|
cancel({
|
|
@@ -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 = "164.0.
|
|
9
|
+
var version = "164.0.3";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -182,6 +182,8 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
const onFocusOut = event => {
|
|
185
|
+
var _window$getSelection;
|
|
186
|
+
|
|
185
187
|
const {
|
|
186
188
|
relatedTarget
|
|
187
189
|
} = event; // Given the user is changing the focus
|
|
@@ -190,6 +192,16 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
190
192
|
|
|
191
193
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(`.${TYPE_AHEAD_POPUP_CONTENT_CLASS}`)) {
|
|
192
194
|
return;
|
|
195
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
196
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
197
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
198
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
199
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
200
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
204
|
+
return;
|
|
193
205
|
}
|
|
194
206
|
|
|
195
207
|
cancel({
|
package/dist/es2019/version.json
CHANGED
|
@@ -181,12 +181,24 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
var onFocusOut = function onFocusOut(event) {
|
|
184
|
+
var _window$getSelection;
|
|
185
|
+
|
|
184
186
|
var relatedTarget = event.relatedTarget; // Given the user is changing the focus
|
|
185
187
|
// When the target is inside the TypeAhead Popup
|
|
186
188
|
// Then the popup should stay open
|
|
187
189
|
|
|
188
190
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(".".concat(TYPE_AHEAD_POPUP_CONTENT_CLASS))) {
|
|
189
191
|
return;
|
|
192
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
193
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
194
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
195
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
196
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
197
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
201
|
+
return;
|
|
190
202
|
}
|
|
191
203
|
|
|
192
204
|
cancel({
|
package/dist/esm/version.json
CHANGED
package/editor/package.json
CHANGED
package/extensions/package.json
CHANGED
package/labs-next/package.json
CHANGED
package/messages/package.json
CHANGED
package/package.json
CHANGED
package/test-utils/package.json
CHANGED