Merge pull request #13092 from Raroun/develop

Fixes #13082
This commit is contained in:
Hypolite Petovan 2023-05-05 14:51:51 -04:00 committed by GitHub
commit 3722aa5016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,10 +26,10 @@ var DzFactory = function (max_imagesize) {
const targetTextarea = document.getElementById(textareaElementId); const targetTextarea = document.getElementById(textareaElementId);
if (targetTextarea.setRangeText) { if (targetTextarea.setRangeText) {
//if setRangeText function is supported by current browser //if setRangeText function is supported by current browser
targetTextarea.setRangeText(' ' + $.trim(serverResponse) + ' '); targetTextarea.setRangeText(serverResponse);
} else { } else {
targetTextarea.focus(); targetTextarea.focus();
document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(serverResponse) + '\n'); document.execCommand('insertText', false /*no UI*/, serverResponse);
} }
}); });
this.on('complete', function(file) { this.on('complete', function(file) {