Pass correct event name to removeEventListener in support function

This commit is contained in:
Dan Stillman 2016-07-23 16:27:44 -04:00
parent 254da12e12
commit ed9e655871

View file

@ -12,7 +12,7 @@ var zoteroObjectKeyRe = /^[23456789ABCDEFGHIJKMNPQRSTUVWXZ]{8}$/; // based on Zo
function waitForDOMEvent(target, event, capture) {
var deferred = Q.defer();
var func = function(ev) {
target.removeEventListener("event", func, capture);
target.removeEventListener(event, func, capture);
deferred.resolve(ev);
}
target.addEventListener(event, func, capture);