Skip to content

Commit

Permalink
Selecting a correct option after an incorrect fails issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sazedul-haque committed Jan 17, 2025
1 parent d45b49e commit b0534e3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion assets/react/front/course/_spotlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ document.addEventListener('DOMContentLoaded', (event) => {
const distanceFromTop = clientY;

scrollDirection = 0;

if (distanceFromBottom < scrollThreshold) {
scrollDirection = calculateScrollSpeed(scrollThreshold, distanceFromBottom, maxScrollSpeed);
} else if (distanceFromTop < scrollThreshold) {
Expand Down Expand Up @@ -194,6 +194,17 @@ document.addEventListener('DOMContentLoaded', (event) => {
newInput.type = 'text';
newInput.setAttribute('value', input.value);
newInput.setAttribute('name', inputName);

/**
* Selecting a correct option after an incorrect fails in mobile issue fixed.
*
* @since 3.2.0
*/
const dropZoneInput = dropZone.querySelector('input');
if (dropZoneInput) {
dropZoneInput.remove();
}

dropZone.appendChild(newInput);
const copyContent = copiedDragElement.querySelector('.tutor-dragging-text-conent').textContent;
dropZone.querySelector('.tutor-dragging-text-conent').textContent = copyContent;
Expand Down

0 comments on commit b0534e3

Please sign in to comment.