+ if (!questionManager.dragEventHandlersInitialised.hasOwnProperty(containerId)) {
+ questionManager.dragEventHandlersInitialised[containerId] = true;
+ // We do not use the body event here to prevent the other event on Mobile device, such as scroll event.
+ var questionContainer = document.getElementById(containerId);
+ if (questionContainer.classList.contains('ddimageortext') &&
+ !questionContainer.classList.contains('qtype_ddimageortext-readonly')) {
+ // TODO: Convert all the jQuery selectors and events to native Javascript.
+ questionManager.addEventHandlersToDrag($(questionContainer).find('.draghome'));
+ }
+ }