@@ -468,6 +468,23 @@ define(function (require, exports, module) {
468468 }
469469
470470 function validateAbbrInput ( e , abbrBox ) {
471+ // Allow keyboard shortcuts and navigation keys
472+ if ( e . ctrlKey || e . metaKey || e . altKey ) {
473+ return ;
474+ }
475+
476+ // Allow navigation and function keys
477+ const allowedKeys = [
478+ 'Backspace' , 'Delete' , 'Tab' , 'Escape' , 'Enter' ,
479+ 'ArrowLeft' , 'ArrowRight' , 'ArrowUp' , 'ArrowDown' ,
480+ 'Home' , 'End' , 'PageUp' , 'PageDown' ,
481+ 'F1' , 'F2' , 'F3' , 'F4' , 'F5' , 'F6' , 'F7' , 'F8' , 'F9' , 'F10' , 'F11' , 'F12'
482+ ] ;
483+
484+ if ( allowedKeys . includes ( e . key ) ) {
485+ return ; // Allow these keys to work normally
486+ }
487+
471488 // Prevent space character
472489 if ( e . key === ' ' ) {
473490 e . preventDefault ( ) ;
@@ -487,8 +504,8 @@ define(function (require, exports, module) {
487504 return ;
488505 }
489506
490- // Check for character limit (30 characters)
491- if ( abbrBox . value . length >= 30 && e . key . length === 1 ) {
507+ // Check for character limit (30 characters) - only for printable characters
508+ if ( abbrBox . value . length >= 30 && e . key . length === 1 && e . key . match ( / [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) _ + \- = \[ \] { } ; ' : " \\ | , . < > \/ ? ] / ) ) {
492509 e . preventDefault ( ) ;
493510
494511 // Determine if this is the edit form or new form
0 commit comments