From 7c7881659d7d364ffc07d16797ea9a7dc08234aa Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 18 Aug 2015 09:45:01 +0200 Subject: [PATCH] Always replace requests in loader by non-GET requests Fix issue that caused form submits to be aborted when there's already a pending autosubmit for the same url. fixes #9024 --- public/js/icinga/loader.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index a6f1de885..758f21656 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -74,11 +74,13 @@ if (autorefresh) { return false; } - // ...ignore the new request if it is already pending with the same URL - if (this.requests[id].url === url) { + // ... ignore the new request if it is already pending with the same URL. Only abort GETs, as those + // are the only methods that are guaranteed to return the same value + if (this.requests[id].url === url && method === 'GET') { this.icinga.logger.debug('Request to ', url, ' is already running for ', $target); return this.requests[id]; } + // ...or abort the former request otherwise this.icinga.logger.debug( 'Aborting pending request loading ',