Skip to content

Commit f705d51

Browse files
committed
after review
1 parent 802da3e commit f705d51

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,17 @@ import { getInstance } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scri
7474
restoreInitialFormData(actions);
7575
};
7676
const dispatchAfterOpenEvent = (actions) => {
77-
actions.addEventListener('transitionend', function handler(event) {
78-
if (event.propertyName !== 'transform') {
79-
return;
80-
}
77+
actions.addEventListener(
78+
'transitionend',
79+
(event) => {
80+
if (event.propertyName !== 'transform') {
81+
return;
82+
}
8183

82-
actions.removeEventListener('transitionend', handler);
83-
doc.body.dispatchEvent(new CustomEvent('ibexa-extra-actions:after-open'));
84-
});
84+
doc.body.dispatchEvent(new CustomEvent('ibexa-extra-actions:after-open'));
85+
},
86+
{ once: true },
87+
);
8588
};
8689
const toggleExtraActionsWidget = (widgetData) => {
8790
const actions = doc.querySelector(`.ibexa-extra-actions[data-actions="${widgetData.actions}"]`);

0 commit comments

Comments
 (0)