You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered: