diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js b/typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js index ba6ba33442e4a42a73919265cd6159d41bc92c0b..8408d9014f78c0c69dbe1a509f4c7ff6b05df04a 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js @@ -521,36 +521,12 @@ define(['jquery', 'TYPO3/CMS/Backend/FormEngine'], function ($, FormEngine) { modified = true; } if (modified) { - $field.attr('value', newValue); - FormEngineValidation.setCaretPosition($field, 0); + $field.val(newValue); } } }); }; - /** - * Set the caret position in a text field - * - * @param {Object} $element - * @param {Number} caretPos - */ - FormEngineValidation.setCaretPosition = function($element, caretPos) { - var elem = $element.get(0); - - if (elem.createTextRange) { - var range = elem.createTextRange(); - range.move('character', caretPos); - range.select(); - } else { - if (elem.selectionStart) { - elem.focus(); - elem.setSelectionRange(caretPos, caretPos); - } else { - elem.focus(); - } - } - }; - /** * Helper function to get clean trimmed array from comma list *