@elementor/editor-canvas 4.3.0-971 → 4.3.0-973
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/dist/index.js
CHANGED
|
@@ -2064,10 +2064,10 @@ function blockFormFieldCreate(args) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
function blockFormFieldMove(args) {
|
|
2066
2066
|
const { containers = [args.container], target } = args;
|
|
2067
|
-
const
|
|
2068
|
-
(container) => container ? hasElementTypes(container, FORM_FIELD_ELEMENT_TYPES) : false
|
|
2067
|
+
const hasLooseFormFields = containers.some(
|
|
2068
|
+
(container) => container ? !hasElementType(container, FORM_ELEMENT_TYPE) && hasElementTypes(container, FORM_FIELD_ELEMENT_TYPES) : false
|
|
2069
2069
|
);
|
|
2070
|
-
if (
|
|
2070
|
+
if (hasLooseFormFields && !isWithinForm(target) && !movedContainersIncludeAtomicFormRoot(containers)) {
|
|
2071
2071
|
handleBlockedFormField();
|
|
2072
2072
|
return true;
|
|
2073
2073
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2018,10 +2018,10 @@ function blockFormFieldCreate(args) {
|
|
|
2018
2018
|
}
|
|
2019
2019
|
function blockFormFieldMove(args) {
|
|
2020
2020
|
const { containers = [args.container], target } = args;
|
|
2021
|
-
const
|
|
2022
|
-
(container) => container ? hasElementTypes(container, FORM_FIELD_ELEMENT_TYPES) : false
|
|
2021
|
+
const hasLooseFormFields = containers.some(
|
|
2022
|
+
(container) => container ? !hasElementType(container, FORM_ELEMENT_TYPE) && hasElementTypes(container, FORM_FIELD_ELEMENT_TYPES) : false
|
|
2023
2023
|
);
|
|
2024
|
-
if (
|
|
2024
|
+
if (hasLooseFormFields && !isWithinForm(target) && !movedContainersIncludeAtomicFormRoot(containers)) {
|
|
2025
2025
|
handleBlockedFormField();
|
|
2026
2026
|
return true;
|
|
2027
2027
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "4.3.0-
|
|
4
|
+
"version": "4.3.0-973",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,26 +37,26 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor": "4.3.0-
|
|
41
|
-
"@elementor/editor-controls": "4.3.0-
|
|
42
|
-
"@elementor/editor-documents": "4.3.0-
|
|
43
|
-
"@elementor/editor-elements": "4.3.0-
|
|
44
|
-
"@elementor/editor-interactions": "4.3.0-
|
|
45
|
-
"@elementor/editor-mcp": "4.3.0-
|
|
46
|
-
"@elementor/editor-notifications": "4.3.0-
|
|
47
|
-
"@elementor/editor-props": "4.3.0-
|
|
48
|
-
"@elementor/editor-responsive": "4.3.0-
|
|
49
|
-
"@elementor/editor-styles": "4.3.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "4.3.0-
|
|
51
|
-
"@elementor/editor-ui": "4.3.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "4.3.0-
|
|
53
|
-
"@elementor/events": "4.3.0-
|
|
54
|
-
"@elementor/http-client": "4.3.0-
|
|
55
|
-
"@elementor/schema": "4.3.0-
|
|
56
|
-
"@elementor/twing": "4.3.0-
|
|
40
|
+
"@elementor/editor": "4.3.0-973",
|
|
41
|
+
"@elementor/editor-controls": "4.3.0-973",
|
|
42
|
+
"@elementor/editor-documents": "4.3.0-973",
|
|
43
|
+
"@elementor/editor-elements": "4.3.0-973",
|
|
44
|
+
"@elementor/editor-interactions": "4.3.0-973",
|
|
45
|
+
"@elementor/editor-mcp": "4.3.0-973",
|
|
46
|
+
"@elementor/editor-notifications": "4.3.0-973",
|
|
47
|
+
"@elementor/editor-props": "4.3.0-973",
|
|
48
|
+
"@elementor/editor-responsive": "4.3.0-973",
|
|
49
|
+
"@elementor/editor-styles": "4.3.0-973",
|
|
50
|
+
"@elementor/editor-styles-repository": "4.3.0-973",
|
|
51
|
+
"@elementor/editor-ui": "4.3.0-973",
|
|
52
|
+
"@elementor/editor-v1-adapters": "4.3.0-973",
|
|
53
|
+
"@elementor/events": "4.3.0-973",
|
|
54
|
+
"@elementor/http-client": "4.3.0-973",
|
|
55
|
+
"@elementor/schema": "4.3.0-973",
|
|
56
|
+
"@elementor/twing": "4.3.0-973",
|
|
57
57
|
"@elementor/ui": "1.37.5",
|
|
58
|
-
"@elementor/utils": "4.3.0-
|
|
59
|
-
"@elementor/wp-media": "4.3.0-
|
|
58
|
+
"@elementor/utils": "4.3.0-973",
|
|
59
|
+
"@elementor/wp-media": "4.3.0-973",
|
|
60
60
|
"@floating-ui/react": "^0.27.5",
|
|
61
61
|
"@wordpress/i18n": "^5.13.0",
|
|
62
62
|
"dompurify": "^3.2.6"
|
|
@@ -5,9 +5,11 @@ import { __ } from '@wordpress/i18n';
|
|
|
5
5
|
import {
|
|
6
6
|
clipboardRootsAreAtomicForms,
|
|
7
7
|
type CreateArgs,
|
|
8
|
+
FORM_ELEMENT_TYPE,
|
|
8
9
|
FORM_FIELD_ELEMENT_TYPES,
|
|
9
10
|
getArgsElementType,
|
|
10
11
|
hasClipboardElementTypes,
|
|
12
|
+
hasElementType,
|
|
11
13
|
hasElementTypes,
|
|
12
14
|
isWithinForm,
|
|
13
15
|
type MoveArgs,
|
|
@@ -58,11 +60,14 @@ function blockFormFieldCreate( args: CreateArgs ): boolean {
|
|
|
58
60
|
function blockFormFieldMove( args: MoveArgs ): boolean {
|
|
59
61
|
const { containers = [ args.container ], target } = args;
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
// Form fields must not be outside a form, but can be moved while inside a form or the container IS a form [ED-23858]
|
|
64
|
+
const hasLooseFormFields = containers.some( ( container ) =>
|
|
65
|
+
container
|
|
66
|
+
? ! hasElementType( container, FORM_ELEMENT_TYPE ) && hasElementTypes( container, FORM_FIELD_ELEMENT_TYPES )
|
|
67
|
+
: false
|
|
63
68
|
);
|
|
64
69
|
|
|
65
|
-
if (
|
|
70
|
+
if ( hasLooseFormFields && ! isWithinForm( target ) && ! movedContainersIncludeAtomicFormRoot( containers ) ) {
|
|
66
71
|
handleBlockedFormField();
|
|
67
72
|
|
|
68
73
|
return true;
|