Pass DOM element, not jQuery object to XBlock initialisation.
The function initializeXBlock() expects a DOM element, and is passed one in most cases. However, when adding a new XBlock component in Studio, the function is passed a jQuery object, which ends up being forwarded to the actual initialisation function of the XBlock.
This commit is contained in:
@@ -43,7 +43,7 @@ define(["jquery", "underscore", "common/js/components/utils/view_utils", "js/vie
|
||||
fragmentsRendered.always(function() {
|
||||
xblockElement = self.$('.xblock').first();
|
||||
try {
|
||||
xblock = XBlock.initializeBlock(xblockElement);
|
||||
xblock = XBlock.initializeBlock(xblockElement.get(0));
|
||||
self.xblock = xblock;
|
||||
self.xblockReady(xblock);
|
||||
if (successCallback) {
|
||||
|
||||
Reference in New Issue
Block a user