Skip to content

Commit

Permalink
emulate user actions for select elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Berezhniy committed Jul 17, 2024
1 parent 5298a5a commit 810eb8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions view/adminhtml/templates/form/versionsManager.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ if ($getModuleVersion->execute('Magefan_AutoRelatedProductExtra')) {
} else {
element.addEventListener('click', function (event) {
this.value = '';

if (this.tagName == 'SELECT') {
this.dispatchEvent(new Event('change', { bubbles: true }));
}

event.preventDefault();
event.stopPropagation();

Expand Down

0 comments on commit 810eb8f

Please sign in to comment.