@squiz/formatted-text-editor 1.49.1-alpha.8 → 1.49.1-alpha.9
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/lib/hooks/useFocus.js +1 -2
- package/package.json +4 -4
- package/src/hooks/useFocus.ts +1 -4
package/lib/hooks/useFocus.js
CHANGED
@@ -7,8 +7,7 @@ const useFocus = (initialState) => {
|
|
7
7
|
const handleFocus = (0, react_1.useCallback)((event) => {
|
8
8
|
// Ignore elements flagged to be ignored, this allows us to add extra, clickable, elements
|
9
9
|
// without triggering a focus, such as action menus.
|
10
|
-
if (!event.target?.classList?.contains('fte-ignore') &&
|
11
|
-
!event.target?.parentElement?.classList?.contains('fte-ignore')) {
|
10
|
+
if (!event.target?.classList?.contains('fte-ignore') && !event.target?.closest('.fte-ignore')) {
|
12
11
|
setIsVisible(true);
|
13
12
|
}
|
14
13
|
}, [wrapperRef]);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@squiz/formatted-text-editor",
|
3
|
-
"version": "1.49.1-alpha.
|
3
|
+
"version": "1.49.1-alpha.9",
|
4
4
|
"main": "lib/index.js",
|
5
5
|
"types": "lib/index.d.ts",
|
6
6
|
"scripts": {
|
@@ -20,8 +20,8 @@
|
|
20
20
|
"@headlessui/react": "1.7.11",
|
21
21
|
"@mui/icons-material": "5.11.16",
|
22
22
|
"@remirror/react": "2.0.25",
|
23
|
-
"@squiz/dx-json-schema-lib": "1.49.1-alpha.
|
24
|
-
"@squiz/resource-browser": "1.49.1-alpha.
|
23
|
+
"@squiz/dx-json-schema-lib": "1.49.1-alpha.9",
|
24
|
+
"@squiz/resource-browser": "1.49.1-alpha.9",
|
25
25
|
"clsx": "1.2.1",
|
26
26
|
"react-hook-form": "7.43.2",
|
27
27
|
"react-image-size": "2.0.0",
|
@@ -75,5 +75,5 @@
|
|
75
75
|
"volta": {
|
76
76
|
"node": "18.15.0"
|
77
77
|
},
|
78
|
-
"gitHead": "
|
78
|
+
"gitHead": "0ab42e828e9332cf241aff26a13b6e6bd6d567de"
|
79
79
|
}
|
package/src/hooks/useFocus.ts
CHANGED
@@ -15,10 +15,7 @@ const useFocus = (
|
|
15
15
|
(event: FocusEvent) => {
|
16
16
|
// Ignore elements flagged to be ignored, this allows us to add extra, clickable, elements
|
17
17
|
// without triggering a focus, such as action menus.
|
18
|
-
if (
|
19
|
-
!event.target?.classList?.contains('fte-ignore') &&
|
20
|
-
!event.target?.parentElement?.classList?.contains('fte-ignore')
|
21
|
-
) {
|
18
|
+
if (!event.target?.classList?.contains('fte-ignore') && !event.target?.closest('.fte-ignore')) {
|
22
19
|
setIsVisible(true);
|
23
20
|
}
|
24
21
|
},
|