@atlaskit/editor-plugin-find-replace 6.0.5 → 6.0.6

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-find-replace
2
2
 
3
+ ## 6.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca13c0bb29d92`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca13c0bb29d92) -
8
+ A11y fix: set the keyboard focus to the first logical element on `Find and Replace` dialog when
9
+ open
10
+
3
11
  ## 6.0.5
4
12
 
5
13
  ### Patch Changes
@@ -22,6 +22,7 @@ var _form = require("@atlaskit/form");
22
22
  var _textLetterCase = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-letter-case"));
23
23
  var _textStyleEmojiKeyboard = _interopRequireDefault(require("@atlaskit/icon/core/migration/text-style--emoji-keyboard"));
24
24
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/text-style"));
25
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
25
26
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
26
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
27
28
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
@@ -172,7 +173,14 @@ var Find = /*#__PURE__*/function (_React$Component) {
172
173
 
173
174
  // focus initially on dialog mount if there is no find text provided
174
175
  if (!this.props.findText) {
175
- this.focusFindTextfield();
176
+ if ((0, _platformFeatureFlags.fg)('platform_editor_a11y_find_replace_focus_fix')) {
177
+ // Wait for findTextfieldRef to become available then focus
178
+ setTimeout(function () {
179
+ _this2.focusFindTextfield();
180
+ }, 100);
181
+ } else {
182
+ this.focusFindTextfield();
183
+ }
176
184
  }
177
185
  this.syncFindText(function () {
178
186
  // focus after input is synced if find text provided
@@ -17,6 +17,7 @@ import { Label } from '@atlaskit/form';
17
17
  import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
18
18
  import MatchCaseIcon from '@atlaskit/icon/core/migration/text-style--emoji-keyboard';
19
19
  import EditorTextStyleIcon from '@atlaskit/icon/glyph/editor/text-style';
20
+ import { fg } from '@atlaskit/platform-feature-flags';
20
21
  import Textfield from '@atlaskit/textfield';
21
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
23
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
@@ -159,7 +160,14 @@ class Find extends React.Component {
159
160
 
160
161
  // focus initially on dialog mount if there is no find text provided
161
162
  if (!this.props.findText) {
162
- this.focusFindTextfield();
163
+ if (fg('platform_editor_a11y_find_replace_focus_fix')) {
164
+ // Wait for findTextfieldRef to become available then focus
165
+ setTimeout(() => {
166
+ this.focusFindTextfield();
167
+ }, 100);
168
+ } else {
169
+ this.focusFindTextfield();
170
+ }
163
171
  }
164
172
  this.syncFindText(() => {
165
173
  // focus after input is synced if find text provided
@@ -24,6 +24,7 @@ import { Label } from '@atlaskit/form';
24
24
  import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
25
25
  import MatchCaseIcon from '@atlaskit/icon/core/migration/text-style--emoji-keyboard';
26
26
  import EditorTextStyleIcon from '@atlaskit/icon/glyph/editor/text-style';
27
+ import { fg } from '@atlaskit/platform-feature-flags';
27
28
  import Textfield from '@atlaskit/textfield';
28
29
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
29
30
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
@@ -169,7 +170,14 @@ var Find = /*#__PURE__*/function (_React$Component) {
169
170
 
170
171
  // focus initially on dialog mount if there is no find text provided
171
172
  if (!this.props.findText) {
172
- this.focusFindTextfield();
173
+ if (fg('platform_editor_a11y_find_replace_focus_fix')) {
174
+ // Wait for findTextfieldRef to become available then focus
175
+ setTimeout(function () {
176
+ _this2.focusFindTextfield();
177
+ }, 100);
178
+ } else {
179
+ this.focusFindTextfield();
180
+ }
173
181
  }
174
182
  this.syncFindText(function () {
175
183
  // focus after input is synced if find text provided
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "6.0.5",
3
+ "version": "6.0.6",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,18 +35,18 @@
35
35
  "@atlaskit/editor-plugin-mentions": "^8.2.0",
36
36
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
- "@atlaskit/editor-shared-styles": "^3.7.0",
38
+ "@atlaskit/editor-shared-styles": "^3.8.0",
39
39
  "@atlaskit/form": "^14.2.0",
40
40
  "@atlaskit/icon": "^28.5.0",
41
- "@atlaskit/icon-lab": "^5.10.0",
41
+ "@atlaskit/icon-lab": "^5.11.0",
42
42
  "@atlaskit/mention": "^24.3.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
- "@atlaskit/primitives": "^16.0.0",
44
+ "@atlaskit/primitives": "^16.1.0",
45
45
  "@atlaskit/textfield": "^8.0.0",
46
46
  "@atlaskit/theme": "^21.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^13.13.0",
48
- "@atlaskit/tokens": "^7.0.0",
49
- "@atlaskit/tooltip": "^20.5.0",
47
+ "@atlaskit/tmp-editor-statsig": "^13.26.0",
48
+ "@atlaskit/tokens": "^7.1.0",
49
+ "@atlaskit/tooltip": "^20.7.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "classnames": "^2.2.5",
@@ -64,7 +64,7 @@
64
64
  "react-dom": "^18.2.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@atlaskit/editor-common": "^110.14.0",
67
+ "@atlaskit/editor-common": "^110.21.0",
68
68
  "react": "^18.2.0",
69
69
  "react-intl-next": "npm:react-intl@^5.18.1"
70
70
  },
@@ -117,6 +117,9 @@
117
117
  },
118
118
  "editor_a11y_refactor_find_replace_style": {
119
119
  "type": "boolean"
120
+ },
121
+ "platform_editor_a11y_find_replace_focus_fix": {
122
+ "type": "boolean"
120
123
  }
121
124
  }
122
125
  }