@oat-sa/tao-core-ui 3.9.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,7 +77,11 @@ define(['exports', 'context', 'lodash'], function (exports, context, _) { 'use s
77
77
  }
78
78
  if (!context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'] && prevClassName !== className) {
79
79
  // Re-build Figure widget to toggle between inline/block
80
- const parent = searchRecurse(widget.element.bdy.rootElement.bdy, widget.serial);
80
+ const parent = searchRecurse(widget.element.rootElement.bdy, widget.serial);
81
+ // If it's Image not Figure (Choice, GapMatch/HotText qti-flow-container)
82
+ if (!parent) {
83
+ return;
84
+ }
81
85
  // If Figure is not in A-block (Prompt, TextReader PCI)
82
86
  if (parent.contentModel === 'inlineStatic' || widget.$container.closest('.qti-customInteraction').length) {
83
87
  _.defer(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oat-sa/tao-core-ui",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "displayName": "TAO Core UI",
5
5
  "description": "UI libraries of TAO",
6
6
  "scripts": {
@@ -81,7 +81,11 @@ export const positionFloat = function positionFloat(widget, position) {
81
81
 
82
82
  if (!context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'] && prevClassName !== className) {
83
83
  // Re-build Figure widget to toggle between inline/block
84
- const parent = searchRecurse(widget.element.bdy.rootElement.bdy, widget.serial);
84
+ const parent = searchRecurse(widget.element.rootElement.bdy, widget.serial);
85
+ // If it's Image not Figure (Choice, GapMatch/HotText qti-flow-container)
86
+ if (!parent) {
87
+ return;
88
+ }
85
89
  // If Figure is not in A-block (Prompt, TextReader PCI)
86
90
  if (parent.contentModel === 'inlineStatic' || widget.$container.closest('.qti-customInteraction').length) {
87
91
  _.defer(() => {