@atlaskit/editor-plugin-selection 2.2.0 → 2.2.2
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 +14 -0
- package/dist/cjs/pm-plugins/auto-expand-selection-range-on-inline-node-main.js +8 -15
- package/dist/es2019/pm-plugins/auto-expand-selection-range-on-inline-node-main.js +8 -15
- package/dist/esm/pm-plugins/auto-expand-selection-range-on-inline-node-main.js +8 -15
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 2.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#149285](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149285)
|
|
14
|
+
[`d00629c3a33cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00629c3a33cf) -
|
|
15
|
+
Clean up feature gate platform_editor_lcm_inline_node_selection_fix
|
|
16
|
+
|
|
3
17
|
## 2.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createAutoExpandSelectionRangeOnInlineNodePlugin = void 0;
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _autoExpandSelectionRangeOnInlineNodeKey = require("./auto-expand-selection-range-on-inline-node-key");
|
|
11
10
|
var createAutoExpandSelectionRangeOnInlineNodePlugin = exports.createAutoExpandSelectionRangeOnInlineNodePlugin = function createAutoExpandSelectionRangeOnInlineNodePlugin() {
|
|
12
11
|
var mouseDownElement = null;
|
|
@@ -23,22 +22,16 @@ var createAutoExpandSelectionRangeOnInlineNodePlugin = exports.createAutoExpandS
|
|
|
23
22
|
// Ignored via go/ees005
|
|
24
23
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
25
24
|
var mouseUpElement = event.target;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
mouseDownElement = null;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
// reset mouse down element after mouse up event
|
|
34
|
-
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
25
|
+
|
|
26
|
+
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
27
|
+
// or mouse down doesn't trigger
|
|
28
|
+
if (!mouseDownElement || mouseDownElement === mouseUpElement) {
|
|
35
29
|
mouseDownElement = null;
|
|
36
|
-
|
|
37
|
-
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
38
|
-
if (mouseDownElement === mouseUpElement) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
30
|
+
return;
|
|
41
31
|
}
|
|
32
|
+
// reset mouse down element after mouse up event
|
|
33
|
+
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
34
|
+
mouseDownElement = null;
|
|
42
35
|
|
|
43
36
|
// terminate early if mouse up event is not fired on inline node
|
|
44
37
|
if (!isMouseUpOnSupportedNode(mouseUpElement)) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
|
|
5
4
|
export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
|
|
6
5
|
let mouseDownElement = null;
|
|
@@ -17,22 +16,16 @@ export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
|
|
|
17
16
|
// Ignored via go/ees005
|
|
18
17
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
19
18
|
const mouseUpElement = event.target;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
mouseDownElement = null;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
// reset mouse down element after mouse up event
|
|
28
|
-
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
19
|
+
|
|
20
|
+
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
21
|
+
// or mouse down doesn't trigger
|
|
22
|
+
if (!mouseDownElement || mouseDownElement === mouseUpElement) {
|
|
29
23
|
mouseDownElement = null;
|
|
30
|
-
|
|
31
|
-
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
32
|
-
if (mouseDownElement === mouseUpElement) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
24
|
+
return;
|
|
35
25
|
}
|
|
26
|
+
// reset mouse down element after mouse up event
|
|
27
|
+
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
28
|
+
mouseDownElement = null;
|
|
36
29
|
|
|
37
30
|
// terminate early if mouse up event is not fired on inline node
|
|
38
31
|
if (!isMouseUpOnSupportedNode(mouseUpElement)) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
|
|
5
4
|
export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAutoExpandSelectionRangeOnInlineNodePlugin() {
|
|
6
5
|
var mouseDownElement = null;
|
|
@@ -17,22 +16,16 @@ export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAut
|
|
|
17
16
|
// Ignored via go/ees005
|
|
18
17
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
19
18
|
var mouseUpElement = event.target;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
mouseDownElement = null;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
// reset mouse down element after mouse up event
|
|
28
|
-
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
19
|
+
|
|
20
|
+
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
21
|
+
// or mouse down doesn't trigger
|
|
22
|
+
if (!mouseDownElement || mouseDownElement === mouseUpElement) {
|
|
29
23
|
mouseDownElement = null;
|
|
30
|
-
|
|
31
|
-
// terminate early if mouse down and mouse up elements are the same -> e.g a click event
|
|
32
|
-
if (mouseDownElement === mouseUpElement) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
24
|
+
return;
|
|
35
25
|
}
|
|
26
|
+
// reset mouse down element after mouse up event
|
|
27
|
+
// so that we can detect the next mouse down event is triggered right after mouse up event or not
|
|
28
|
+
mouseDownElement = null;
|
|
36
29
|
|
|
37
30
|
// terminate early if mouse up event is not fired on inline node
|
|
38
31
|
if (!isMouseUpOnSupportedNode(mouseUpElement)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"runReact18": true
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/editor-common": "^
|
|
23
|
+
"@atlaskit/editor-common": "^104.0.0",
|
|
24
24
|
"@atlaskit/editor-plugin-interaction": "^1.0.0",
|
|
25
25
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
26
26
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
27
27
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
28
28
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
29
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
29
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
30
30
|
"@atlaskit/tokens": "^4.8.0",
|
|
31
31
|
"@babel/runtime": "^7.0.0"
|
|
32
32
|
},
|
|
@@ -88,9 +88,6 @@
|
|
|
88
88
|
"platform_editor_fix_drag_and_drop_lists": {
|
|
89
89
|
"type": "boolean"
|
|
90
90
|
},
|
|
91
|
-
"platform_editor_lcm_inline_node_selection_fix": {
|
|
92
|
-
"type": "boolean"
|
|
93
|
-
},
|
|
94
91
|
"platform_editor_nested_tables_gap_cursor": {
|
|
95
92
|
"type": "boolean"
|
|
96
93
|
},
|