User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Each instance of CodeMirror has an initialization function specific to its id which runs on page load. This doesn't work for CodeMirror instances that should appear within subforms since they may not exist when the page loads and their ids are added dynamically.
One function to initialize any and all instances of CodeMirror. Runs once on page load and again on subform-row-add
so that CodeMirror will work when placed in a subform.
Use CodeMirror without subform and expect it to work as usual.
Create a form with an editor
field in a repeatable subform. Before this change, you should get only a plain textarea
. After, you should get a fully functional CodeMirror for each row you add.
Nope
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Front End Plugins |
I have tested this item
Category | Front End Plugins | ⇒ | Layout Front End Plugins Unit Tests |
Updated so that 'chosen' fields also work in the same way.
can we please split the things?
Here do the fix only for CodeMiror and Chosen do separately, as there already some tricky code to init chosen https://github.com/joomla/joomla-cms/blob/staging/media/system/js/subform-repeatable-uncompressed.js#L230 and it need to be removed if there a better way to do it.
Category | Front End Plugins Layout Unit Tests | ⇒ | Front End Plugins |
@okonomiyaki3000 can this be tested using com_fields?
@franz-wohlkoenig I don't know. I'm not very familiar with com_fields. Can it create repeatable subforms?
Come on now.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-22 15:47:45 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Thanks for the tips. I didn't realize
.find()
was slightly faster than passing a context. I'm gonna stick with the data attribute. Just seems simpler and more elegant than Joomla options storage in this case.