diff options
Diffstat (limited to 'app/assets/javascripts/blob/file_template_mediator.js')
-rw-r--r-- | app/assets/javascripts/blob/file_template_mediator.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/blob/file_template_mediator.js b/app/assets/javascripts/blob/file_template_mediator.js index 136457c115d..991f98c89e7 100644 --- a/app/assets/javascripts/blob/file_template_mediator.js +++ b/app/assets/javascripts/blob/file_template_mediator.js @@ -247,7 +247,11 @@ export default class FileTemplateMediator { } setFilename(name) { - this.$filenameInput.val(name).trigger('change'); + const input = this.$filenameInput.get(0); + if (name !== undefined && input.value !== name) { + input.value = name; + input.dispatchEvent(new Event('change')); + } } getSelected() { |