@atlaskit/editor-plugin-selection 2.2.0 → 2.2.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,13 @@
1
1
  # @atlaskit/editor-plugin-selection
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149285](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149285)
8
+ [`d00629c3a33cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00629c3a33cf) -
9
+ Clean up feature gate platform_editor_lcm_inline_node_selection_fix
10
+
3
11
  ## 2.2.0
4
12
 
5
13
  ### 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
- if ((0, _platformFeatureFlags.fg)('platform_editor_lcm_inline_node_selection_fix')) {
27
- // terminate early if mouse down and mouse up elements are the same -> e.g a click event
28
- // or mouse down doesn't trigger
29
- if (!mouseDownElement || mouseDownElement === mouseUpElement) {
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
- } else {
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
- if (fg('platform_editor_lcm_inline_node_selection_fix')) {
21
- // terminate early if mouse down and mouse up elements are the same -> e.g a click event
22
- // or mouse down doesn't trigger
23
- if (!mouseDownElement || mouseDownElement === mouseUpElement) {
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
- } else {
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
- if (fg('platform_editor_lcm_inline_node_selection_fix')) {
21
- // terminate early if mouse down and mouse up elements are the same -> e.g a click event
22
- // or mouse down doesn't trigger
23
- if (!mouseDownElement || mouseDownElement === mouseUpElement) {
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
- } else {
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.0",
3
+ "version": "2.2.1",
4
4
  "description": "Selection plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -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
  },