@atlaskit/editor-core 162.0.1 → 162.0.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.
@@ -201,6 +201,18 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
201
201
  };
202
202
 
203
203
  var onFocusOut = function onFocusOut(event) {
204
+ var _window$getSelection;
205
+
206
+ // See ED-14909: Chrome may emit focusout events where an input
207
+ // device was not directly responsible. (This rears in react v17+ consumers
208
+ // where react-managed node removal now appears to propagate focusout events to
209
+ // our event listener). As this path is strictly for click or other typeahead
210
+ // dismissals that don't involve typeahead item selection, we carve out an
211
+ // exception for Chrome-specific events where an input device was not the initiator.
212
+ if (_utils.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !(event !== null && event !== void 0 && event.sourceCapabilities)) {
213
+ return;
214
+ }
215
+
204
216
  cancel({
205
217
  addPrefixTrigger: true,
206
218
  text: cleanedInputContent(),
@@ -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 = "162.0.1";
9
+ var version = "162.0.2";
10
10
  exports.version = version;
11
11
 
12
12
  var nextMajorVersion = function nextMajorVersion() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "162.0.1",
3
+ "version": "162.0.2",
4
4
  "sideEffects": false
5
5
  }
@@ -181,6 +181,18 @@ export const InputQuery = /*#__PURE__*/React.memo(({
181
181
  };
182
182
 
183
183
  const onFocusOut = event => {
184
+ var _window$getSelection;
185
+
186
+ // See ED-14909: Chrome may emit focusout events where an input
187
+ // device was not directly responsible. (This rears in react v17+ consumers
188
+ // where react-managed node removal now appears to propagate focusout events to
189
+ // our event listener). As this path is strictly for click or other typeahead
190
+ // dismissals that don't involve typeahead item selection, we carve out an
191
+ // exception for Chrome-specific events where an input device was not the initiator.
192
+ if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !(event !== null && event !== void 0 && event.sourceCapabilities)) {
193
+ return;
194
+ }
195
+
184
196
  cancel({
185
197
  addPrefixTrigger: true,
186
198
  text: cleanedInputContent(),
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "162.0.1";
2
+ export const version = "162.0.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "162.0.1",
3
+ "version": "162.0.2",
4
4
  "sideEffects": false
5
5
  }
@@ -180,6 +180,18 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
180
180
  };
181
181
 
182
182
  var onFocusOut = function onFocusOut(event) {
183
+ var _window$getSelection;
184
+
185
+ // See ED-14909: Chrome may emit focusout events where an input
186
+ // device was not directly responsible. (This rears in react v17+ consumers
187
+ // where react-managed node removal now appears to propagate focusout events to
188
+ // our event listener). As this path is strictly for click or other typeahead
189
+ // dismissals that don't involve typeahead item selection, we carve out an
190
+ // exception for Chrome-specific events where an input device was not the initiator.
191
+ if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !(event !== null && event !== void 0 && event.sourceCapabilities)) {
192
+ return;
193
+ }
194
+
183
195
  cancel({
184
196
  addPrefixTrigger: true,
185
197
  text: cleanedInputContent(),
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "162.0.1";
2
+ export var version = "162.0.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "162.0.1",
3
+ "version": "162.0.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "162.0.1",
3
+ "version": "162.0.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"