From f17cfc71e1177d1da375ac5046152fa1db2399e7 Mon Sep 17 00:00:00 2001 From: Ryan Olds Date: Thu, 9 Feb 2017 10:26:21 -0800 Subject: [PATCH] Push fix for assessmentResults not consistently being marked complete --- js/adapt-contrib-assessmentResults.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/adapt-contrib-assessmentResults.js b/js/adapt-contrib-assessmentResults.js index ca85473..fb9272b 100644 --- a/js/adapt-contrib-assessmentResults.js +++ b/js/adapt-contrib-assessmentResults.js @@ -143,7 +143,13 @@ define(function(require) { if (this._isVisibleTop || this._isVisibleBottom) { this.setCompletionStatus(); - this.$el.off("inview"); + + // Sometimes (with mobile and virtual keyboards) inview can be triggered + // but the component is not _visible = true, so it does not get marked + // complete. Delay the unbinding of the inview listener until complete + if (this.isComplete()) { + this.$el.off("inview"); + } } } },