diff --git a/bootbox.js b/bootbox.js index 6c7df7b8..c18b3f30 100644 --- a/bootbox.js +++ b/bootbox.js @@ -559,6 +559,18 @@ // need the closure here since input isn't // an object otherwise input.focus(); + if ( + (options.inputType == 'text') || + (options.inputType == 'date') || + (options.inputType == 'email') || + (options.inputType == 'time') || + (options.inputType == 'number') || + (options.inputType == 'password') + ) { + var tmp = input.val(); + input.val(''); + input.val(tmp); + } }); if (shouldShow === true) {