@atlaskit/editor-plugin-expand 1.6.1 → 1.6.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,11 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#93962](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93962) [`797e12a40048`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/797e12a40048) - [ED-23107] fix functionality for moving down from the title of an expand with the arrow key down - you can be anywhere inside the single player expand title and move down now. the single player expand is only used when live view is enabled and the platform.editor.single-player-expand FF is enabled.
8
+
3
9
  ## 1.6.1
4
10
 
5
11
  ### Patch Changes
@@ -222,7 +222,11 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
222
222
  value = _this$input2.value,
223
223
  selectionStart = _this$input2.selectionStart,
224
224
  selectionEnd = _this$input2.selectionEnd;
225
- if (selectionStart === selectionEnd && selectionStart === value.length) {
225
+ var selectionStartExists = selectionStart !== null && selectionStart !== undefined;
226
+ var selectionEndExists = selectionEnd !== null && selectionEnd !== undefined;
227
+ var selectionStartInsideTitle = selectionStartExists && selectionStart >= 0 && selectionStart <= value.length;
228
+ var selectionEndInsideTitle = selectionEndExists && selectionEnd >= 0 && selectionEnd <= value.length;
229
+ if (selectionStartInsideTitle && selectionEndInsideTitle) {
226
230
  var _this$view5 = _this.view,
227
231
  state = _this$view5.state,
228
232
  dispatch = _this$view5.dispatch;
@@ -216,7 +216,11 @@ export class ExpandNodeView {
216
216
  selectionStart,
217
217
  selectionEnd
218
218
  } = this.input;
219
- if (selectionStart === selectionEnd && selectionStart === value.length) {
219
+ const selectionStartExists = selectionStart !== null && selectionStart !== undefined;
220
+ const selectionEndExists = selectionEnd !== null && selectionEnd !== undefined;
221
+ const selectionStartInsideTitle = selectionStartExists && selectionStart >= 0 && selectionStart <= value.length;
222
+ const selectionEndInsideTitle = selectionEndExists && selectionEnd >= 0 && selectionEnd <= value.length;
223
+ if (selectionStartInsideTitle && selectionEndInsideTitle) {
220
224
  const {
221
225
  state,
222
226
  dispatch
@@ -214,7 +214,11 @@ export var ExpandNodeView = /*#__PURE__*/function () {
214
214
  value = _this$input2.value,
215
215
  selectionStart = _this$input2.selectionStart,
216
216
  selectionEnd = _this$input2.selectionEnd;
217
- if (selectionStart === selectionEnd && selectionStart === value.length) {
217
+ var selectionStartExists = selectionStart !== null && selectionStart !== undefined;
218
+ var selectionEndExists = selectionEnd !== null && selectionEnd !== undefined;
219
+ var selectionStartInsideTitle = selectionStartExists && selectionStart >= 0 && selectionStart <= value.length;
220
+ var selectionEndInsideTitle = selectionEndExists && selectionEnd >= 0 && selectionEnd <= value.length;
221
+ if (selectionStartInsideTitle && selectionEndInsideTitle) {
218
222
  var _this$view5 = _this.view,
219
223
  state = _this$view5.state,
220
224
  dispatch = _this$view5.dispatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,14 +35,14 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^35.10.0",
37
37
  "@atlaskit/button": "^17.14.0",
38
- "@atlaskit/editor-common": "^78.31.0",
38
+ "@atlaskit/editor-common": "^78.33.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.1.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
42
42
  "@atlaskit/editor-plugin-selection": "^1.2.0",
43
43
  "@atlaskit/editor-plugin-selection-marker": "^1.3.0",
44
44
  "@atlaskit/editor-prosemirror": "4.0.0",
45
- "@atlaskit/editor-shared-styles": "^2.9.0",
45
+ "@atlaskit/editor-shared-styles": "^2.10.0",
46
46
  "@atlaskit/editor-tables": "^2.7.0",
47
47
  "@atlaskit/icon": "^22.1.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/editor-plugin-content-insertion": "^1.1.0",
62
62
  "@atlaskit/editor-plugin-guideline": "^1.1.0",
63
63
  "@atlaskit/editor-plugin-quick-insert": "^1.1.0",
64
- "@atlaskit/editor-plugin-table": "^7.8.0",
64
+ "@atlaskit/editor-plugin-table": "^7.10.0",
65
65
  "@atlaskit/editor-plugin-type-ahead": "^1.1.0",
66
66
  "@atlaskit/editor-plugin-width": "^1.1.0",
67
67
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",