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

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,20 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 3.15.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.15.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [#147080](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147080)
14
+ [`3c9bbcfd3436f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c9bbcfd3436f) -
15
+ [ux] [ED-24900] This change fixes a bug when deleting media groups from empty panels and
16
+ blockquotes with Backspace.
17
+
3
18
  ## 3.15.5
4
19
 
5
20
  ### 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.7",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^40.9.0",
37
- "@atlaskit/editor-common": "^91.2.0",
37
+ "@atlaskit/editor-common": "^92.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
39
39
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
40
40
  "@atlaskit/editor-prosemirror": "6.0.0",