@atlaskit/editor-plugin-selection-toolbar 1.1.0 → 1.1.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 CHANGED
@@ -1,77 +1,119 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#96198](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96198)
8
+ [`b69d14268915`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b69d14268915) -
9
+ [ux] EDF-629 fixed floating toolbar elements stealing selection from editor
10
+
11
+ ## 1.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#94316](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94316)
16
+ [`35fd5ed8e1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35fd5ed8e1d7) -
17
+ Upgrading internal dependency `bind-event-listener` to `@^3.0.0`
18
+
3
19
  ## 1.1.0
4
20
 
5
21
  ### Minor Changes
6
22
 
7
- - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934) [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) - bumped editor-prosemirror version to 4.0.0
23
+ - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
24
+ [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
25
+ bumped editor-prosemirror version to 4.0.0
8
26
 
9
27
  ### Patch Changes
10
28
 
11
- - Updated dependencies
29
+ - Updated dependencies
12
30
 
13
31
  ## 1.0.2
14
32
 
15
33
  ### Patch Changes
16
34
 
17
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
35
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
36
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
37
+ Upgrade Typescript from `4.9.5` to `5.4.2`
18
38
 
19
39
  ## 1.0.1
20
40
 
21
41
  ### Patch Changes
22
42
 
23
- - Updated dependencies
43
+ - Updated dependencies
24
44
 
25
45
  ## 1.0.0
26
46
 
27
47
  ### Major Changes
28
48
 
29
- - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386) [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) - This changeset exists to bump all editor plugins that currently don't have a major version. This is to address an issue with Jira plugin consumption.
49
+ - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
50
+ [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
51
+ This changeset exists to bump all editor plugins that currently don't have a major version. This
52
+ is to address an issue with Jira plugin consumption.
30
53
 
31
54
  ### Patch Changes
32
55
 
33
- - Updated dependencies
56
+ - Updated dependencies
34
57
 
35
58
  ## 0.2.1
36
59
 
37
60
  ### Patch Changes
38
61
 
39
- - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572) [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) - Upgrading @atlaskit/editor-prosemirror dependency
62
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
63
+ [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
64
+ Upgrading @atlaskit/editor-prosemirror dependency
40
65
 
41
66
  ## 0.2.0
42
67
 
43
68
  ### Minor Changes
44
69
 
45
- - [#68277](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68277) [`fe0abf4abc01`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fe0abf4abc01) - Enable the selection toolbar to work with live pages view mode
70
+ - [#68277](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68277)
71
+ [`fe0abf4abc01`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fe0abf4abc01) -
72
+ Enable the selection toolbar to work with live pages view mode
46
73
 
47
74
  ## 0.1.5
48
75
 
49
76
  ### Patch Changes
50
77
 
51
- - Updated dependencies
78
+ - Updated dependencies
52
79
 
53
80
  ## 0.1.4
54
81
 
55
82
  ### Patch Changes
56
83
 
57
- - [#65802](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65802) [`438ead060875`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/438ead060875) - Ensure all editor plugins are marked as singletons
84
+ - [#65802](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65802)
85
+ [`438ead060875`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/438ead060875) -
86
+ Ensure all editor plugins are marked as singletons
58
87
 
59
88
  ## 0.1.3
60
89
 
61
90
  ### Patch Changes
62
91
 
63
- - [#43081](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43081) [`efe83787c45`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efe83787c45) - [ux] ED-20762 Remove blur dom event handler to prevent the toolbar disappearing when using the keyboard to access it.
92
+ - [#43081](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43081)
93
+ [`efe83787c45`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efe83787c45) - [ux]
94
+ ED-20762 Remove blur dom event handler to prevent the toolbar disappearing when using the
95
+ keyboard to access it.
64
96
 
65
97
  ## 0.1.2
66
98
 
67
99
  ### Patch Changes
68
100
 
69
- - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935) [`d9e2cafc03e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9e2cafc03e) - [ux] ED-20664 Fix position of floating toolbar on non full-page editors when using editor-plugin-selection-toolbar
70
- - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935) [`31e453b325e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31e453b325e) - [ux] ED-20807 Prevents the selection toolbar from extending outside of the Editor.
71
- - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935) [`bc3880e7c3c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc3880e7c3c) - [ux] ED-20806 Prevents the selection toolbar from overriding the table floating toolbar by preventing rendering on anything that's not a text selection.
101
+ - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935)
102
+ [`d9e2cafc03e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9e2cafc03e) - [ux]
103
+ ED-20664 Fix position of floating toolbar on non full-page editors when using
104
+ editor-plugin-selection-toolbar
105
+ - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935)
106
+ [`31e453b325e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31e453b325e) - [ux]
107
+ ED-20807 Prevents the selection toolbar from extending outside of the Editor.
108
+ - [#42935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42935)
109
+ [`bc3880e7c3c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc3880e7c3c) - [ux]
110
+ ED-20806 Prevents the selection toolbar from overriding the table floating toolbar by preventing
111
+ rendering on anything that's not a text selection.
72
112
 
73
113
  ## 0.1.1
74
114
 
75
115
  ### Patch Changes
76
116
 
77
- - [#42201](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42201) [`36241a43553`](https://bitbucket.org/atlassian/atlassian-frontend/commits/36241a43553) - ED-20653 Removes the selection toolbar when the view loses focus.
117
+ - [#42201](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42201)
118
+ [`36241a43553`](https://bitbucket.org/atlassian/atlassian-frontend/commits/36241a43553) -
119
+ ED-20653 Removes the selection toolbar when the view loses focus.
@@ -57,9 +57,19 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
57
57
  }));
58
58
  }
59
59
  });
60
+ var unbindMousedown = (0, _bindEventListener.bind)(_view.root, {
61
+ type: 'mousedown',
62
+ listener: function listener(event) {
63
+ // prevent default to avoid blur event on floating toolbar
64
+ if (event.target instanceof Element && event.target.closest('[data-testid="editor-floating-toolbar"]')) {
65
+ event.preventDefault();
66
+ }
67
+ }
68
+ });
60
69
  return {
61
70
  destroy: function destroy() {
62
71
  unbind();
72
+ unbindMousedown();
63
73
  }
64
74
  };
65
75
  },
@@ -49,9 +49,19 @@ export const selectionToolbarPlugin = options => {
49
49
  }));
50
50
  }
51
51
  });
52
+ const unbindMousedown = bind(view.root, {
53
+ type: 'mousedown',
54
+ listener: event => {
55
+ // prevent default to avoid blur event on floating toolbar
56
+ if (event.target instanceof Element && event.target.closest('[data-testid="editor-floating-toolbar"]')) {
57
+ event.preventDefault();
58
+ }
59
+ }
60
+ });
52
61
  return {
53
62
  destroy() {
54
63
  unbind();
64
+ unbindMousedown();
55
65
  }
56
66
  };
57
67
  },
@@ -50,9 +50,19 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(options) {
50
50
  }));
51
51
  }
52
52
  });
53
+ var unbindMousedown = bind(_view.root, {
54
+ type: 'mousedown',
55
+ listener: function listener(event) {
56
+ // prevent default to avoid blur event on floating toolbar
57
+ if (event.target instanceof Element && event.target.closest('[data-testid="editor-floating-toolbar"]')) {
58
+ event.preventDefault();
59
+ }
60
+ }
61
+ });
53
62
  return {
54
63
  destroy: function destroy() {
55
64
  unbind();
65
+ unbindMousedown();
56
66
  }
57
67
  };
58
68
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,11 +33,11 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^78.31.0",
36
+ "@atlaskit/editor-common": "^78.37.0",
37
37
  "@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
38
38
  "@atlaskit/editor-prosemirror": "4.0.0",
39
39
  "@babel/runtime": "^7.0.0",
40
- "bind-event-listener": "^2.1.1"
40
+ "bind-event-listener": "^3.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^16.8.0"