Fix broken Return key in export route dialog
2a431932made it possible to press `Return` to confirm the export dialog. After5b52abc1this stopped working though, even when the text input had focus. This is due to moving the `<input>` out of the `<form>` and referencing the form's `name` attribute instead. However "The value of [the form] attribute must be the id of a <form> in the same document" according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button. Adding such an `id` restores the `Return` key to working properly. The same change is done for the no-go form, where the same issue would otherwise affect a later patch adding similar `Return` key handling. Test Plan: - Create Route, open "Export route" dialog. - Move focus to an input field. - Press `Return`. - The file dialog for saving should open.
This commit is contained in:
parent
144cc2923e
commit
f31c379369
1 changed files with 3 additions and 3 deletions
|
|
@ -427,7 +427,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="export">
|
||||
<form name="export" id="exportForm">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-sm-2" data-i18n="export.trackname">Name</label>
|
||||
<div class="col-sm-10">
|
||||
|
|
@ -519,7 +519,7 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-i18n="export.title"
|
||||
form="export"
|
||||
form="exportForm"
|
||||
id="submitExport"
|
||||
>
|
||||
Export route
|
||||
|
|
@ -712,7 +712,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="nogoError" class="invalid-feedback" style="display: none"></p>
|
||||
<form name="loadNogosForm">
|
||||
<form name="loadNogosForm" id="loadNogosForm">
|
||||
<fieldset>
|
||||
<legend data-i18n="loadNogos.source">Source</legend>
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue