User tests: Successful: Unsuccessful:
Pull Request resolves #40641 .
This fixes an issue where the CodeMirror editor is duplicated when subform rows are reordered as it adds a minimal guard using the JoomlaEditor registry to prevent duplicate initialization
Each time a subform row is reordered, a new CodeMirror editor instance is created for the same textarea, resulting in duplicated editors in the ui
The CodeMirror editor is initialized only once per textarea
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository NPM Change |
| Labels |
Added:
NPM Resource Changed
bug
PR-5.4-dev
|
||
I have tested this item ✅ successfully on 4352456
I have tested this successfully I believe ;) and the error is now gone :D
@adarshdubey03 - thank you!
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-04-04 09:26:24 |
| Closed_By | ⇒ | adarshdubey03 |
@adarshdubey03 Why have you closed this PR? It has 1 successful human test.
@richard67 I think that not an issue since update to v6 #41070
@Fedik No the issue is still there, however in yesterdays Friday Pr Testing we observed the issue is in chrome and firefox browser only, on safari this is not an issue as mentioned by Emmanuel in his earlier comment. @richard67 there is a problem with my solution that is it gives console errors mentioned by Emmanuel and i am working on this issue, i will reopen this pr when i will be sure with the solution
Okay. I think it is need to look on disconnectedCallback() behavior. When element moved in the DOM it removes old editor from DOM and destroys its instance. Maybe in Safari it actually works correctly but in other browsers there a bug related to this.
| Status | Closed | ⇒ | New |
| Closed_Date | 2026-04-04 09:26:24 | ⇒ | |
| Closed_By | adarshdubey03 | ⇒ |
| Status | New | ⇒ | Pending |
| Category | JavaScript Repository NPM Change | ⇒ | Unit Tests Repository Administration com_admin com_associations com_content com_fields com_installer JavaScript com_media NPM Change Language & Strings Modules |
This pull request has conflicts, please resolve those before we can evaluate the pull request.
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-04-05 06:42:52 |
| Closed_By | ⇒ | adarshdubey03 | |
| Labels |
Added:
Unit/System Tests
Language Change
Conflicting Files
|
||
@adarshdubey03 During the Friday April 3rd PR testing session, I was able to replicate the BEFORE condition on Chrome (3 duplicates fields), Firefox (crazy number of fields), but it did not affect Safari 26.4 as you described.
Applying the FIX, did fix the situation in Firefox / Chrome, however it created error message in Console, which I highly doubt will let your PR get through as is.
Uncaught (in promise) TypeError: can't access property "id", this.element is undefined
connectedCallback https://www.domain.com/_j544/media/plg_editors_codemirror/js/joomla-editor-codemirror.min.js?7da19f:4
n https://www.domain.com/_j544/media/system/js/fields/joomla-field-subform.min.js?4fead1:4
setUpDragSort https://www.domain.com/_j544/media/system/js/fields/joomla-field-subform.min.js?4fead1:4
2 joomla-editor-codemirror.min.js:4:1139
Hope it helps...