Skip to content

Commit

Permalink
Merge branch 'develop' into 4.4
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/config/app.php
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
  • Loading branch information
brandonkelly committed Jan 10, 2023
2 parents 70ed3b5 + 852dc54 commit 3034d88
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Release Notes for Craft CMS 4

## Unreleased
## 4.3.6.1 - 2023-01-09

- Element edit pages now retain their previous scroll position when they’re automatically refreshed to keep up with changes from another browser tab.
- Fixed a bug where editing certain Matrix/Neo/Super Table fields could result in content loss. ([#12445](https://github.com/craftcms/cms/issues/12445))

## 4.3.6 - 2023-01-04

Expand Down
2 changes: 1 addition & 1 deletion src/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '4.3.6',
'version' => '4.3.6.1',
'schemaVersion' => '4.4.0.1',
'minVersionRequired' => '3.7.11',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

29 changes: 9 additions & 20 deletions src/web/assets/cp/src/js/ElementEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1633,13 +1633,7 @@ Craft.ElementEditor = Garnish.Base.extend(
'g'
),
(m, pre, id, post) => {
let duplicate = false;
try {
duplicate = this._filterFieldInputName(pre);
} catch (e) {
console.warn(`Unexpected input name: ${m}`);
}
if (!duplicate) {
if (!this._filterFieldInputName(pre)) {
return m;
}
return pre + this.duplicatedElements[id] + post;
Expand All @@ -1651,17 +1645,12 @@ Craft.ElementEditor = Garnish.Base.extend(
(m, name, id) => {
// Ignore param names that end in `[enabled]`, `[type]`, etc.
// (`[sortOrder]` should pass here, which could be set to a specific order index, but *not* `[sortOrder][]`!)
let duplicate = false;
try {
duplicate =
this._filterFieldInputName(name) &&
!name.match(
new RegExp(`${lb}(enabled|sortOrder|type|typeId)${rb}$`)
);
} catch (e) {
console.warn(`Unexpected input name: ${m}`);
}
if (!duplicate) {
if (
!this._filterFieldInputName(name) ||
name.match(
new RegExp(`${lb}(enabled|sortOrder|type|typeId)${rb}$`)
)
) {
return m;
}
return `&${name}=${this.duplicatedElements[id]}`;
Expand All @@ -1679,13 +1668,13 @@ Craft.ElementEditor = Garnish.Base.extend(
const lb = encodeURIComponent('[');
const rb = encodeURIComponent(']');
const nestedNames = name.match(
new RegExp(`(\\bfields|${lb}fields${rb})${lb}[^${rb}]+${rb}`, 'g')
new RegExp(`(\\bfields|${lb}fields${rb})${lb}.+?${rb}`, 'g')
);
if (!nestedNames) {
throw `Unexpected input name: ${name}`;
}
const lastHandle = nestedNames[nestedNames.length - 1].match(
new RegExp(`(?:\\bfields|${lb}fields${rb})${lb}([^${rb}]+)${rb}`)
new RegExp(`(?:\\bfields|${lb}fields${rb})${lb}(.+?)${rb}`)
)[1];
return Craft.fieldsWithoutContent.includes(lastHandle);
},
Expand Down

0 comments on commit 3034d88

Please sign in to comment.