I came across an issue where I was unable to complete a text component within a trickle article due to the fact that setCompletionStatus was called whilst inview but _isVisible === false on the model.
The result was that the model was not set as complete but the inview listener was removed meaning the setCompletionStatus could never get called again and the component could never be completed.
inview.js only checks an element's style attribute but not computed style, meaning isVisible will be passed as true when the element (or parent) has the .visibility-hidden class.
I suggest we alter the checks to use getComputedStyle instead in the lines below
https://github.com/adaptlearning/adapt_framework/blob/master/src/core/js/libraries/inview.js#L507-L518
I came across an issue where I was unable to complete a text component within a trickle article due to the fact that
setCompletionStatuswas called whilst inview but_isVisible === falseon the model.The result was that the model was not set as complete but the inview listener was removed meaning the
setCompletionStatuscould never get called again and the component could never be completed.inview.js only checks an element's style attribute but not computed style, meaning isVisible will be passed as true when the element (or parent) has the
.visibility-hiddenclass.I suggest we alter the checks to use getComputedStyle instead in the lines below
https://github.com/adaptlearning/adapt_framework/blob/master/src/core/js/libraries/inview.js#L507-L518