From: Vincent Vanwaelscappel Date: Wed, 18 Oct 2023 10:19:47 +0000 (+0200) Subject: wait #6420 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=68e58304675c54bb8ca7b601ef1984f221cb3830;p=fluidbook-toolbox.git wait #6420 @1 --- diff --git a/resources/linkeditor/js/linkeditor.form.js b/resources/linkeditor/js/linkeditor.form.js index c36c0197a..f2e987e14 100644 --- a/resources/linkeditor/js/linkeditor.form.js +++ b/resources/linkeditor/js/linkeditor.form.js @@ -45,6 +45,14 @@ LinkeditorForm.prototype = { $this.updateLinkForm(); }); + $(document).on('change keyup keydown', '#linkeditor-panel-form [name="uid"]', function () { + let v = $(this).val(); + v = v.replace(/[^a-zA-Z0-9_]*/g, ''); + if (v !== $(this).val()) { + $(this).val(v); + } + return true; + }); setInterval(function () { if ($(document.activeElement).is('.sp-input')) {