@atlaskit/editor-plugin-block-menu 4.0.16 → 4.0.17
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 4.0.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dc211dc1927b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dc211dc1927b5) -
|
|
8
|
+
[ux] ED-29232: Fixed issues with block menu for file
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 4.0.16
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -24,6 +24,11 @@ var isNestedNode = exports.isNestedNode = function isNestedNode(selection, menuT
|
|
|
24
24
|
}
|
|
25
25
|
var $from = selection.$from;
|
|
26
26
|
var depth = $from.depth;
|
|
27
|
+
|
|
28
|
+
// When a file is in card view, selection.$from has a depth of 1, but it is not a nested node, should return false
|
|
29
|
+
if ($from.depth === 1 && selection instanceof _state.NodeSelection && selection.node.type.name === 'media' && selection.node.attrs.type === 'file') {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
27
32
|
if ($from.depth > 0 && selection instanceof _state.NodeSelection) {
|
|
28
33
|
return true;
|
|
29
34
|
}
|
|
@@ -21,6 +21,11 @@ export const isNestedNode = (selection, menuTriggerBy) => {
|
|
|
21
21
|
$from
|
|
22
22
|
} = selection;
|
|
23
23
|
const depth = $from.depth;
|
|
24
|
+
|
|
25
|
+
// When a file is in card view, selection.$from has a depth of 1, but it is not a nested node, should return false
|
|
26
|
+
if ($from.depth === 1 && selection instanceof NodeSelection && selection.node.type.name === 'media' && selection.node.attrs.type === 'file') {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
24
29
|
if ($from.depth > 0 && selection instanceof NodeSelection) {
|
|
25
30
|
return true;
|
|
26
31
|
}
|
|
@@ -19,6 +19,11 @@ export var isNestedNode = function isNestedNode(selection, menuTriggerBy) {
|
|
|
19
19
|
}
|
|
20
20
|
var $from = selection.$from;
|
|
21
21
|
var depth = $from.depth;
|
|
22
|
+
|
|
23
|
+
// When a file is in card view, selection.$from has a depth of 1, but it is not a nested node, should return false
|
|
24
|
+
if ($from.depth === 1 && selection instanceof NodeSelection && selection.node.type.name === 'media' && selection.node.attrs.type === 'file') {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
22
27
|
if ($from.depth > 0 && selection instanceof NodeSelection) {
|
|
23
28
|
return true;
|
|
24
29
|
}
|