FIX: Only trigger callback for parent transition events.
* This fixes a bug where multiple requests were being made to the server whenever the composer is opened.
This commit is contained in:
parent
45f4ce379e
commit
3ff9133f85
|
@ -25,5 +25,8 @@ var transitionEnd = (function() {
|
|||
})();
|
||||
|
||||
export default function (element, callback) {
|
||||
return $(element).on(transitionEnd, callback);
|
||||
return $(element).on(transitionEnd, event => {
|
||||
if (event.target !== event.currentTarget) return;
|
||||
return callback(event);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue