@atlaskit/editor-plugin-selection-toolbar 1.1.1 → 1.1.3

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