Commit bed752e9 authored by Romain Courteaud's avatar Romain Courteaud

erp5_xhtml_style: ckeditor: fix cancellation issue

parent 2e0a80bb
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<!-- This gadget provides ckeditor with all Plugins activated by default --> <!-- This gadget provides ckeditor with all Plugins activated by default -->
<!-- Make sure to check the timestamp of your CKEditor version in order to update the manifest --> <!-- Make sure to check the timestamp of your CKEditor version in order to update the manifest -->
<script src="gadget_global.js"></script>
<script src="ckeditor/ckeditor.js"></script> <script src="ckeditor/ckeditor.js"></script>
<script src="ckeditor.gadget.js" type="text/javascript"></script> <script src="ckeditor.gadget.js" type="text/javascript"></script>
......
...@@ -44,20 +44,10 @@ ...@@ -44,20 +44,10 @@
try { try {
result = callback(evt); result = callback(evt);
} catch (e) { } catch (e) {
result = RSVP.reject(e); return reject(e);
} }
callback_promise = result; callback_promise = new RSVP.Queue(result).push(undefined, reject);
new RSVP.Queue()
.push(function () {
return result;
})
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
}; };
target.addEventListener(type, handle_event_callback, useCapture); target.addEventListener(type, handle_event_callback, useCapture);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment