@atlaskit/editor-plugin-media 1.39.0 → 1.39.1

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-media
2
2
 
3
+ ## 1.39.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#159807](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159807)
8
+ [`1bec926742a8a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1bec926742a8a) -
9
+ ED-25583 Update getMediaFromSupportedMediaNodesFromSelection to take into consideration inline
10
+ selections
11
+ - Updated dependencies
12
+
3
13
  ## 1.39.0
4
14
 
5
15
  ### Minor Changes
@@ -212,6 +212,11 @@ var getMediaSingleOrInlineNodeFromSelection = exports.getMediaSingleOrInlineNode
212
212
  var getMediaFromSupportedMediaNodesFromSelection = exports.getMediaFromSupportedMediaNodesFromSelection = function getMediaFromSupportedMediaNodesFromSelection(state) {
213
213
  var _ref4 = state.selection,
214
214
  node = _ref4.node;
215
+
216
+ // Specifically for media supported nodes, double click could have been initiated on the media caption
217
+ if (!node) {
218
+ return null;
219
+ }
215
220
  switch (node.type) {
216
221
  case node.type.schema.nodes.media:
217
222
  case node.type.schema.nodes.mediaInline:
@@ -222,6 +222,11 @@ export const getMediaFromSupportedMediaNodesFromSelection = state => {
222
222
  const {
223
223
  node
224
224
  } = state.selection;
225
+
226
+ // Specifically for media supported nodes, double click could have been initiated on the media caption
227
+ if (!node) {
228
+ return null;
229
+ }
225
230
  switch (node.type) {
226
231
  case node.type.schema.nodes.media:
227
232
  case node.type.schema.nodes.mediaInline:
@@ -205,6 +205,11 @@ export var getMediaSingleOrInlineNodeFromSelection = function getMediaSingleOrIn
205
205
  export var getMediaFromSupportedMediaNodesFromSelection = function getMediaFromSupportedMediaNodesFromSelection(state) {
206
206
  var _ref4 = state.selection,
207
207
  node = _ref4.node;
208
+
209
+ // Specifically for media supported nodes, double click could have been initiated on the media caption
210
+ if (!node) {
211
+ return null;
212
+ }
208
213
  switch (node.type) {
209
214
  case node.type.schema.nodes.media:
210
215
  case node.type.schema.nodes.mediaInline:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.39.0",
3
+ "version": "1.39.1",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
37
37
  "@atlaskit/analytics-next": "^10.1.0",
38
38
  "@atlaskit/button": "^20.3.0",
39
- "@atlaskit/editor-common": "^94.9.0",
39
+ "@atlaskit/editor-common": "^94.11.0",
40
40
  "@atlaskit/editor-palette": "1.6.3",
41
41
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
42
42
  "@atlaskit/editor-plugin-annotation": "1.23.3",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/editor-plugin-selection": "^1.5.0",
51
51
  "@atlaskit/editor-plugin-width": "^1.3.0",
52
52
  "@atlaskit/editor-prosemirror": "6.0.0",
53
- "@atlaskit/editor-shared-styles": "^3.1.0",
53
+ "@atlaskit/editor-shared-styles": "^3.2.0",
54
54
  "@atlaskit/editor-tables": "^2.8.0",
55
55
  "@atlaskit/form": "^10.5.0",
56
56
  "@atlaskit/icon": "^22.24.0",
@@ -67,7 +67,7 @@
67
67
  "@atlaskit/textfield": "^6.5.0",
68
68
  "@atlaskit/theme": "^14.0.0",
69
69
  "@atlaskit/tmp-editor-statsig": "^2.11.0",
70
- "@atlaskit/tokens": "^2.0.0",
70
+ "@atlaskit/tokens": "^2.1.0",
71
71
  "@atlaskit/tooltip": "^18.8.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",