]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6420 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Oct 2023 10:19:47 +0000 (12:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Oct 2023 10:19:47 +0000 (12:19 +0200)
resources/linkeditor/js/linkeditor.form.js

index c36c0197a425ebe6bbb51a34ed96658e3fa7c8c6..f2e987e147310a0c2a849f8637da34a4775f12fd 100644 (file)
@@ -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')) {