Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/media_source/system/js/joomla-toolbar-button.w-c.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ window.customElements.define('joomla-toolbar-button', class extends HTMLElement
// because we cannot currently extend HTMLButtonElement
this.buttonElement = this.querySelector('button, a');

this.addEventListener('click', this.executeTask);
this.buttonElement.addEventListener('click', this.executeTask);

// Check whether we have a form
const formSelector = this.form || 'adminForm';
Expand Down Expand Up @@ -67,7 +67,7 @@ window.customElements.define('joomla-toolbar-button', class extends HTMLElement
this.formElement.boxchecked.removeEventListener('change', this.onChange);
}

this.removeEventListener('click', this.executeTask);
this.buttonElement.removeEventListener('click', this.executeTask);
}

onChange({ target }) {
Expand Down