Skip to content

Commit

Permalink
Merge branch 'release-30.25.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 20, 2024
2 parents 34b9431 + 31071fb commit caefa84
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions views/js/qtiCreator/widgets/helpers/selectionWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ define(['jquery'], function ($) {
* @param {jQuery} $wrapper - the element that will wrap the selection
* @returns {boolean}
*/
wrapWith: function wrapWith($wrapper) {
const range = selection.getRangeAt(0);
wrapWith: function wrapWith($wrapper, providedRange) {
const range = providedRange || selection.getRangeAt(0);

if (this.canWrap()) {
if (this.canWrap(range)) {
try {
range.surroundContents($wrapper[0]);
selection.removeAllRanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ define([
} else {
if (
$cloneContent.text() === $cloneContent.html() &&
wrapper.wrapWith($newHottextClone)
wrapper.wrapWith($newHottextClone, range)
) {
await this.createNewHottext($newHottextClone);
} else {
Expand Down

0 comments on commit caefa84

Please sign in to comment.