Pass correct event name to removeEventListener in support function
This commit is contained in:
parent
254da12e12
commit
ed9e655871
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue