@atlaskit/editor-plugin-extension 2.0.1 → 2.0.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,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169955](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169955)
|
|
8
|
+
[`3c2ffc27c518e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c2ffc27c518e) -
|
|
9
|
+
ED-25863 add logic to stop the LCM inner editor losing focus. Tweak blur logic for extension to
|
|
10
|
+
fully remove current selection when clicking into the LCM.
|
|
11
|
+
|
|
3
12
|
## 2.0.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -234,10 +234,9 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
234
234
|
if ((0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro')) {
|
|
235
235
|
var currentTarget = event.relatedTarget;
|
|
236
236
|
var source = event.target;
|
|
237
|
-
var selection = view.state.selection;
|
|
238
237
|
|
|
239
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
240
|
-
if (
|
|
238
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
239
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
241
240
|
var emptySelection = new _state.TextSelection(view.state.doc.resolve(0));
|
|
242
241
|
var tr = view.state.tr.setSelection(emptySelection);
|
|
243
242
|
view.dispatch(tr);
|
|
@@ -158,10 +158,9 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
158
158
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
159
159
|
const currentTarget = event.relatedTarget;
|
|
160
160
|
const source = event.target;
|
|
161
|
-
const selection = view.state.selection;
|
|
162
161
|
|
|
163
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
164
|
-
if (
|
|
162
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
163
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
165
164
|
const emptySelection = new TextSelection(view.state.doc.resolve(0));
|
|
166
165
|
const tr = view.state.tr.setSelection(emptySelection);
|
|
167
166
|
view.dispatch(tr);
|
|
@@ -208,10 +208,9 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
208
208
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
209
209
|
var currentTarget = event.relatedTarget;
|
|
210
210
|
var source = event.target;
|
|
211
|
-
var selection = view.state.selection;
|
|
212
211
|
|
|
213
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
214
|
-
if (
|
|
212
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
213
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
215
214
|
var emptySelection = new TextSelection(view.state.doc.resolve(0));
|
|
216
215
|
var tr = view.state.tr.setSelection(emptySelection);
|
|
217
216
|
view.dispatch(tr);
|