Fixed iOS SubmitEvent submitter value

Related bug: https://bugs.webkit.org/show_bug.cgi?id=229660
This commit is contained in:
mxdanger 2022-05-04 14:08:39 -07:00
parent a67e883e61
commit 8dc6914f4b
2 changed files with 3 additions and 3 deletions

View file

@ -233,7 +233,7 @@ function initDraw() {
objectInfoForm.addEventListener('submit', function(e) { objectInfoForm.addEventListener('submit', function(e) {
e.preventDefault() e.preventDefault()
// Allows for html form validation with preview button // Allows for html form validation with preview button
if (e.submitter.value == "preview") { if (e.submitter && e.submitter.value == "Preview") {
preview() preview()
} else { } else {
exportJson() exportJson()

View file

@ -333,8 +333,8 @@ <h6>Need Help?</h6>
</label> </label>
<div id="wikiGroup" class="mb-3 d-flex flex-column gap-2"></div> <div id="wikiGroup" class="mb-3 d-flex flex-column gap-2"></div>
<div id="infoButtons" class="d-flex flex-wrap flex-row-reverse gap-2"> <div id="infoButtons" class="d-flex flex-wrap flex-row-reverse gap-2">
<button type="submit" class="btn btn-primary flex-fill" id="exportButton">Export</button> <input type="submit" class="btn btn-primary flex-fill" id="exportButton" value="Export">
<button type="submit" class="btn btn-secondary flex-fill" id="previewButton" value="preview">Preview</button> <input type="submit" class="btn btn-secondary flex-fill" id="previewButton" value="Preview">
<button type="button" class="btn btn-secondary flex-fill" id="cancelButton">Back</button> <button type="button" class="btn btn-secondary flex-fill" id="cancelButton">Back</button>
</div> </div>
</form> </form>