File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import handleStickyToolbar from './stickyToolbar';
2424import handleSyncEmailValues from './syncEmailValues' ;
2525import handleTabPanels from './tabPanels' ;
2626import handleToggleAdvanced from './toggleAdvanced' ;
27+ import trimInput from './trimInput' ;
2728import handleUnlimitedInput from './unlimitedInput' ;
2829import initRrdCharts from './rrdCharts' ;
2930import initWebTerminal from './webTerminal' ;
@@ -51,6 +52,7 @@ function initListeners() {
5152 handleSyncEmailValues ( ) ;
5253 handleTabPanels ( ) ;
5354 handleToggleAdvanced ( ) ;
55+ trimInput ( ) ;
5456 initRrdCharts ( ) ;
5557 initWebTerminal ( ) ;
5658}
Original file line number Diff line number Diff line change 1+ //trim leading / trailing spaces form input fields
2+ export default function trimInput ( ) {
3+ document . querySelectorAll ( 'input[type="text"]' ) . forEach ( ( input ) => {
4+ input . addEventListener ( 'change' , function ( ) {
5+ this . value = this . value . trim ( ) ;
6+ } ) ;
7+ } ) ;
8+ }
You can’t perform that action at this time.
0 commit comments