Skip to content

Commit

Permalink
HPCC-30907 ECL Watch Idle Watcher + No Auth issue
Browse files Browse the repository at this point in the history
Idle watcher should not be initialised for no auth environments

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Nov 28, 2023
1 parent afa5393 commit cc40d0d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions esp/src/src/ESPUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,20 +333,22 @@ export const IdleWatcher = dojo.declare([Evented], {

start() {
this.stop();
const context = this;
this._keydownHandle = on(document, "keydown", function (item, index, array) {
context.emit("active", {});
context.stop();
context.start();
});
this._mousedownHandle = on(document, "mousedown", function (item, index, array) {
context.emit("active", {});
context.stop();
context.start();
});
this._intervalHandle = setInterval(function () {
context.emit("idle", {});
}, this._idleDuration);
if (document.cookie.indexOf("ESPSessionState=true") > -1) {
const context = this;
this._keydownHandle = on(document, "keydown", function (item, index, array) {
context.emit("active", {});
context.stop();
context.start();
});
this._mousedownHandle = on(document, "mousedown", function (item, index, array) {
context.emit("active", {});
context.stop();
context.start();
});
this._intervalHandle = setInterval(function () {
context.emit("idle", {});
}, this._idleDuration);
}
},

stop() {
Expand Down

0 comments on commit cc40d0d

Please sign in to comment.