@atlaskit/editor-plugin-placeholder-text 0.1.13 → 0.1.15

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,18 @@
1
1
  # @atlaskit/editor-plugin-placeholder-text
2
2
 
3
+ ## 0.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [#66398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66398) [`dd2a685a2f06`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dd2a685a2f06) - Bugfix for clicking on a placeholder to focus within the editor when the side context panel is open
8
+ - Updated dependencies
9
+
10
+ ## 0.1.14
11
+
12
+ ### Patch Changes
13
+
14
+ - [#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
15
+
3
16
  ## 0.1.13
4
17
 
5
18
  ### Patch Changes
@@ -50,6 +50,11 @@ var PlaceholderTextNodeView = exports.PlaceholderTextNodeView = /*#__PURE__*/fun
50
50
  var tr = _view.state.tr;
51
51
  tr.setSelection(_state.Selection.near(tr.doc.resolve(startNodePosition)));
52
52
  _view.dispatch(tr);
53
+ if (!_view.hasFocus()) {
54
+ window.requestAnimationFrame(function () {
55
+ _view.focus();
56
+ });
57
+ }
53
58
  return true;
54
59
  }
55
60
  return false;
@@ -40,6 +40,11 @@ export class PlaceholderTextNodeView {
40
40
  const tr = view.state.tr;
41
41
  tr.setSelection(Selection.near(tr.doc.resolve(startNodePosition)));
42
42
  view.dispatch(tr);
43
+ if (!view.hasFocus()) {
44
+ window.requestAnimationFrame(() => {
45
+ view.focus();
46
+ });
47
+ }
43
48
  return true;
44
49
  }
45
50
  return false;
@@ -43,6 +43,11 @@ export var PlaceholderTextNodeView = /*#__PURE__*/function () {
43
43
  var tr = _view.state.tr;
44
44
  tr.setSelection(Selection.near(tr.doc.resolve(startNodePosition)));
45
45
  _view.dispatch(tr);
46
+ if (!_view.hasFocus()) {
47
+ window.requestAnimationFrame(function () {
48
+ _view.focus();
49
+ });
50
+ }
46
51
  return true;
47
52
  }
48
53
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-placeholder-text",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "placeholder text plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -16,13 +16,14 @@
16
16
  "atlaskit:src": "src/index.ts",
17
17
  "atlassian": {
18
18
  "team": "Editor: Scarlet",
19
+ "singleton": true,
19
20
  "inPublicMirror": false,
20
21
  "releaseModel": "continuous",
21
22
  "runReact18": false
22
23
  },
23
24
  "dependencies": {
24
25
  "@atlaskit/adf-schema": "^35.3.0",
25
- "@atlaskit/editor-common": "^76.35.0",
26
+ "@atlaskit/editor-common": "^76.37.0",
26
27
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
27
28
  "@atlaskit/editor-plugin-type-ahead": "^0.9.0",
28
29
  "@atlaskit/editor-prosemirror": "1.1.0",
@@ -43,7 +44,6 @@
43
44
  "@atlaskit/editor-plugin-floating-toolbar": "^0.7.0",
44
45
  "@atlaskit/ssr": "*",
45
46
  "@atlaskit/visual-regression": "*",
46
- "@atlaskit/webdriver-runner": "*",
47
47
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
48
48
  "@testing-library/react": "^12.1.5",
49
49
  "react-dom": "^16.8.0",