@@ -463,10 +463,16 @@ function addElement(settingForm: SettingForm): HTMLElement {
463463
464464 settingsOptionControl . appendChild ( formElement ) ;
465465
466- const formGroup = document . createElement ( "div" ) ;
467- formGroup . classList . add ( "form-group" ) ;
466+ // formGroup wraps label (and description)
467+ // if a description exists; otherwise use formElement directly.
468+ let formGroup = formElement ;
468469
469- formElement . appendChild ( formGroup ) ;
470+ if ( settingForm . description ) {
471+ formGroup = document . createElement ( "div" ) ;
472+ formGroup . classList . add ( "form-group" ) ;
473+
474+ formElement . appendChild ( formGroup ) ;
475+ }
470476
471477 const formLabel = document . createElement ( "label" ) ;
472478 formLabel . classList . add ( "form-label" ) ;
@@ -488,6 +494,7 @@ function addElement(settingForm: SettingForm): HTMLElement {
488494 const formTypeInput = document . createElement ( "input" ) ;
489495 formTypeInput . id = `setting-${ settingForm . id } ` ;
490496 formTypeInput . classList . add ( "form-type-text" ) ;
497+ formTypeInput . type = "text" ;
491498
492499 if ( settingForm . placeholder ) {
493500 formTypeInput . placeholder =
@@ -502,6 +509,7 @@ function addElement(settingForm: SettingForm): HTMLElement {
502509 const formTypeNumber = document . createElement ( "input" ) ;
503510 formTypeNumber . id = `setting-${ settingForm . id } ` ;
504511 formTypeNumber . classList . add ( "form-type-number" ) ;
512+ formTypeNumber . type = "number" ;
505513
506514 if ( settingForm . placeholder ) {
507515 formTypeNumber . placeholder =
0 commit comments