@atlaskit/editor-plugin-table 10.9.18 → 10.9.19

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,15 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 10.9.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149969)
8
+ [`42c3f35e57188`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/42c3f35e57188) -
9
+ ED-27882: Get rid of parent offset check in \_handleRef in the react node view. Add metadata to
10
+ these calls in the \_handleRef and \_handleTableRef.
11
+ - Updated dependencies
12
+
3
13
  ## 10.9.18
4
14
 
5
15
  ### Patch Changes
@@ -187,7 +187,13 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
187
187
  var resolvedSelection = selectionBookmark.resolve(_this2.view.state.tr.doc);
188
188
  // Don't set the selection if it's the same as the current selection.
189
189
  if (!resolvedSelection.eq(_this2.view.state.selection)) {
190
- _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
190
+ if ((0, _platformFeatureFlags.fg)('platform_editor_r18_fix_selection_resync')) {
191
+ var tr = _this2.view.state.tr.setSelection(resolvedSelection);
192
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
193
+ _this2.view.dispatch(tr);
194
+ } else {
195
+ _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
196
+ }
191
197
  }
192
198
  }
193
199
  });
@@ -158,7 +158,13 @@ export default class TableView extends ReactNodeView {
158
158
  const resolvedSelection = selectionBookmark.resolve(this.view.state.tr.doc);
159
159
  // Don't set the selection if it's the same as the current selection.
160
160
  if (!resolvedSelection.eq(this.view.state.selection)) {
161
- this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
161
+ if (fg('platform_editor_r18_fix_selection_resync')) {
162
+ const tr = this.view.state.tr.setSelection(resolvedSelection);
163
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
164
+ this.view.dispatch(tr);
165
+ } else {
166
+ this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
167
+ }
162
168
  }
163
169
  }
164
170
  });
@@ -180,7 +180,13 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
180
180
  var resolvedSelection = selectionBookmark.resolve(_this2.view.state.tr.doc);
181
181
  // Don't set the selection if it's the same as the current selection.
182
182
  if (!resolvedSelection.eq(_this2.view.state.selection)) {
183
- _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
183
+ if (fg('platform_editor_r18_fix_selection_resync')) {
184
+ var tr = _this2.view.state.tr.setSelection(resolvedSelection);
185
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
186
+ _this2.view.dispatch(tr);
187
+ } else {
188
+ _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
189
+ }
184
190
  }
185
191
  }
186
192
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "10.9.18",
3
+ "version": "10.9.19",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -206,6 +206,9 @@
206
206
  },
207
207
  "platform_editor_table_last_col_drag_handle_fix": {
208
208
  "type": "boolean"
209
+ },
210
+ "platform_editor_r18_fix_selection_resync": {
211
+ "type": "boolean"
209
212
  }
210
213
  }
211
214
  }
@@ -225,7 +225,13 @@ export default class TableView extends ReactNodeView<Props> {
225
225
  const resolvedSelection = selectionBookmark.resolve(this.view.state.tr.doc);
226
226
  // Don't set the selection if it's the same as the current selection.
227
227
  if (!resolvedSelection.eq(this.view.state.selection)) {
228
- this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
228
+ if (fg('platform_editor_r18_fix_selection_resync')) {
229
+ const tr = this.view.state.tr.setSelection(resolvedSelection);
230
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
231
+ this.view.dispatch(tr);
232
+ } else {
233
+ this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
234
+ }
229
235
  }
230
236
  }
231
237
  });