@atlaskit/editor-tables 2.8.5 → 2.9.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,22 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
8
+ [`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
9
+ Bumped editor-prosemirror version to 7.0.0
10
+
11
+ ## 2.8.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [#109121](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109121)
16
+ [`6d2a8d349742b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6d2a8d349742b) -
17
+ [ux] [ED-25650] This PR is aligning keyboard behaviour for nested tables and parent tables by
18
+ fixing a bug where pressing Tab sometimes incorrectly selects the drag handle and gets stuck.
19
+
3
20
  ## 2.8.5
4
21
 
5
22
  ### Patch Changes
@@ -52,6 +52,11 @@ function findNextCell($cell, direction) {
52
52
  return $cell.pos + $cell.nodeAfter.nodeSize;
53
53
  }
54
54
  var table = $cell.node(-1);
55
+
56
+ // table is the parent table, not the nested table
57
+ if ($cell.node(-4) && $cell.node(-4).type.name === 'table') {
58
+ table = $cell.node(-4);
59
+ }
55
60
  for (var _row = $cell.indexAfter(-1), rowStart = $cell.after(); _row < table.childCount; _row++) {
56
61
  var _rowNode = table.child(_row);
57
62
  if (_rowNode.childCount) {
@@ -45,7 +45,12 @@ function findNextCell($cell, direction) {
45
45
  if ($cell.index() < $cell.parent.childCount - 1 && $cell.nodeAfter) {
46
46
  return $cell.pos + $cell.nodeAfter.nodeSize;
47
47
  }
48
- const table = $cell.node(-1);
48
+ let table = $cell.node(-1);
49
+
50
+ // table is the parent table, not the nested table
51
+ if ($cell.node(-4) && $cell.node(-4).type.name === 'table') {
52
+ table = $cell.node(-4);
53
+ }
49
54
  for (let row = $cell.indexAfter(-1), rowStart = $cell.after(); row < table.childCount; row++) {
50
55
  const rowNode = table.child(row);
51
56
  if (rowNode.childCount) {
@@ -46,6 +46,11 @@ function findNextCell($cell, direction) {
46
46
  return $cell.pos + $cell.nodeAfter.nodeSize;
47
47
  }
48
48
  var table = $cell.node(-1);
49
+
50
+ // table is the parent table, not the nested table
51
+ if ($cell.node(-4) && $cell.node(-4).type.name === 'table') {
52
+ table = $cell.node(-4);
53
+ }
49
54
  for (var _row = $cell.indexAfter(-1), rowStart = $cell.after(); _row < table.childCount; _row++) {
50
55
  var _rowNode = table.child(_row);
51
56
  if (_rowNode.childCount) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.8.5",
3
+ "version": "2.9.0",
4
4
  "description": "A package that contains common classes and utility functions for editor tables",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,7 +27,7 @@
27
27
  "singleton": true
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/editor-prosemirror": "6.2.1",
30
+ "@atlaskit/editor-prosemirror": "7.0.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.0.0",
32
32
  "@babel/runtime": "^7.0.0"
33
33
  },