@atlaskit/editor-plugin-floating-toolbar 0.7.10 → 0.7.11
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 +6 -0
- package/dist/cjs/ui/Dropdown.js +11 -5
- package/dist/es2019/ui/Dropdown.js +11 -5
- package/dist/esm/ui/Dropdown.js +11 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.7.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43825](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43825) [`135446e0465`](https://bitbucket.org/atlassian/atlassian-frontend/commits/135446e0465) - [ED-20885] Add setTimeout to make sure a tooltip for a dropdown item renders at the correct position
|
|
8
|
+
|
|
3
9
|
## 0.7.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -204,11 +204,17 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
204
204
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
205
205
|
var dropList = document.querySelector('[data-role="droplistContent"]');
|
|
206
206
|
if (dropList) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
// Add setTimeout so that if a dropdown item has tooltip,
|
|
208
|
+
// the tooltip won't be rendered until next render cycle
|
|
209
|
+
// when the droplist is correctly positioned.
|
|
210
|
+
// This makes tooltip appears at the correct position for the first dropdown item.
|
|
211
|
+
setTimeout(function () {
|
|
212
|
+
var keyboardEvent = new KeyboardEvent('keydown', {
|
|
213
|
+
bubbles: true,
|
|
214
|
+
key: 'ArrowDown'
|
|
215
|
+
});
|
|
216
|
+
dropList.dispatchEvent(keyboardEvent);
|
|
217
|
+
}, 0);
|
|
212
218
|
}
|
|
213
219
|
}
|
|
214
220
|
}
|
|
@@ -180,11 +180,17 @@ export default class Dropdown extends Component {
|
|
|
180
180
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
181
181
|
const dropList = document.querySelector('[data-role="droplistContent"]');
|
|
182
182
|
if (dropList) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
// Add setTimeout so that if a dropdown item has tooltip,
|
|
184
|
+
// the tooltip won't be rendered until next render cycle
|
|
185
|
+
// when the droplist is correctly positioned.
|
|
186
|
+
// This makes tooltip appears at the correct position for the first dropdown item.
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
const keyboardEvent = new KeyboardEvent('keydown', {
|
|
189
|
+
bubbles: true,
|
|
190
|
+
key: 'ArrowDown'
|
|
191
|
+
});
|
|
192
|
+
dropList.dispatchEvent(keyboardEvent);
|
|
193
|
+
}, 0);
|
|
188
194
|
}
|
|
189
195
|
}
|
|
190
196
|
}
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -196,11 +196,17 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
196
196
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
197
197
|
var dropList = document.querySelector('[data-role="droplistContent"]');
|
|
198
198
|
if (dropList) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
// Add setTimeout so that if a dropdown item has tooltip,
|
|
200
|
+
// the tooltip won't be rendered until next render cycle
|
|
201
|
+
// when the droplist is correctly positioned.
|
|
202
|
+
// This makes tooltip appears at the correct position for the first dropdown item.
|
|
203
|
+
setTimeout(function () {
|
|
204
|
+
var keyboardEvent = new KeyboardEvent('keydown', {
|
|
205
|
+
bubbles: true,
|
|
206
|
+
key: 'ArrowDown'
|
|
207
|
+
});
|
|
208
|
+
dropList.dispatchEvent(keyboardEvent);
|
|
209
|
+
}, 0);
|
|
204
210
|
}
|
|
205
211
|
}
|
|
206
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
28
28
|
"@atlaskit/button": "^16.17.0",
|
|
29
29
|
"@atlaskit/checkbox": "^13.0.0",
|
|
30
|
-
"@atlaskit/editor-common": "^76.
|
|
30
|
+
"@atlaskit/editor-common": "^76.23.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.5.2",
|
|
32
32
|
"@atlaskit/editor-plugin-context-panel": "^0.2.0",
|
|
33
33
|
"@atlaskit/editor-plugin-copy-button": "^1.0.0",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-extension": "^0.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-table": "^5.
|
|
38
|
+
"@atlaskit/editor-plugin-table": "^5.4.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
40
40
|
"@atlaskit/emoji": "^67.6.0",
|
|
41
41
|
"@atlaskit/icon": "^22.0.0",
|
|
42
42
|
"@atlaskit/menu": "^2.1.0",
|
|
43
|
-
"@atlaskit/modal-dialog": "^12.
|
|
43
|
+
"@atlaskit/modal-dialog": "^12.9.0",
|
|
44
44
|
"@atlaskit/select": "^17.0.0",
|
|
45
45
|
"@atlaskit/theme": "^12.6.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
47
47
|
"@atlaskit/tooltip": "^18.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|