User tests: Successful: Unsuccessful:
This PR adds events to the showing and hiding of shown elements.
So now you can trigger stuff when elements are dynamically shown or hidden, like:
document.addEventListener('joomla:showon-show', () => {
const editor = document.querySelector('.CodeMirror');
editor && editor.CodeMirror.refresh();
});
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
Sucks that we have to wait at least another 3 months before we can use this in our extensions to work around issues in Joomla.
Which means I'll have to implement some kind of work-around, which defies the reason for needing this in core for me.
Labels |
Added:
NPM Resource Changed
?
|
I have tested this item
For test create a field with showon, and add next js somewhere:
document.addEventListener('joomla:showon-show', () => {
alert('Show!')
});
document.addEventListener('joomla:showon-hide', () => {
alert('Hide!')
});
You should get an alert when an element is shows and when it hides.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Thanks!
Labels |
Added:
?
|
I have tested this item
I have tested this item
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-13 22:58:53 |
Closed_By | ⇒ | bembelimen |
Thx
Thanks, looks good now. Ready for testing.