@atlaskit/editor-plugin-block-type 3.15.5 → 3.15.6

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,14 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 3.15.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#147080](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147080)
8
+ [`3c9bbcfd3436f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c9bbcfd3436f) -
9
+ [ux] [ED-24900] This change fixes a bug when deleting media groups from empty panels and
10
+ blockquotes with Backspace.
11
+
3
12
  ## 3.15.5
4
13
 
5
14
  ### Patch Changes
@@ -51,10 +51,7 @@ function deleteBlockContent(isNodeAWrappingBlockNode) {
51
51
  }
52
52
  var isParentNodeOfTypePanel = (0, _utils.hasParentNodeOfType)([state.schema.nodes.panel])(state.selection);
53
53
  var isParentNodeOfTypeBlockQuote = (0, _utils.hasParentNodeOfType)([state.schema.nodes.blockquote])(state.selection);
54
- if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
55
- return false;
56
- }
57
- if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
54
+ if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
58
55
  tr.setSelection(new _state.TextSelection(tr.doc.resolve($from.before())));
59
56
  tr.delete($from.before(), $from.after());
60
57
  } else {
@@ -49,10 +49,7 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
49
49
  }
50
50
  const isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
51
51
  const isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
52
- if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
53
- return false;
54
- }
55
- if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
52
+ if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
56
53
  tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
57
54
  tr.delete($from.before(), $from.after());
58
55
  } else {
@@ -46,10 +46,7 @@ export function deleteBlockContent(isNodeAWrappingBlockNode) {
46
46
  }
47
47
  var isParentNodeOfTypePanel = hasParentNodeOfType([state.schema.nodes.panel])(state.selection);
48
48
  var isParentNodeOfTypeBlockQuote = hasParentNodeOfType([state.schema.nodes.blockquote])(state.selection);
49
- if (isSelectedNodeMediaGroup(state) && (isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote)) {
50
- return false;
51
- }
52
- if (isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
49
+ if ((isParentNodeOfTypePanel || isParentNodeOfTypeBlockQuote) && isSelectedNodeMediaGroup(state) || isParentNodeOfTypePanel && isSelectedNodeSoleDecisionItem(state)) {
53
50
  tr.setSelection(new TextSelection(tr.doc.resolve($from.before())));
54
51
  tr.delete($from.before(), $from.after());
55
52
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "3.15.5",
3
+ "version": "3.15.6",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",