Fix form submission bug in firefox (#470)

* Fix form submission bug in firefox

* 4.1.1
This commit is contained in:
Josh Johnson 2018-11-24 17:48:03 +00:00 committed by GitHub
parent 2324827bbe
commit 61204b9173
3 changed files with 31 additions and 0 deletions

View file

@ -176,6 +176,15 @@
<label for="choices-custom-properties">Custom properties</label>
<select class="form-control" name="choices-custom-properties" id="choices-custom-properties" multiple></select>
</div>
<div data-test-hook="within-form">
<form>
<label for="choices-within-form">Within form</label>
<select class="form-control" name="choices-within-form" id="choices-within-form" multiple>
<option value="Choice 1">Choice 1</option>
</select>
</form>
</div>
</div>
</div>
<script>
@ -285,6 +294,8 @@
}
]
});
new Choices('#choices-within-form');
});
</script>
</body>

View file

@ -180,6 +180,15 @@
<label for="choices-custom-properties">Custom properties</label>
<select class="form-control" name="choices-custom-properties" id="choices-custom-properties"></select>
</div>
<div data-test-hook="within-form">
<form>
<label for="choices-within-form">Within form</label>
<select class="form-control" name="choices-within-form" id="choices-within-form">
<option value="Choice 1">Choice 1</option>
</select>
</form>
</div>
</div>
</div>
<script>
@ -297,6 +306,8 @@
}
]
});
new Choices('#choices-within-form');
});
</script>
</body>

View file

@ -83,6 +83,13 @@
<label for="choices-placeholder">Placeholder</label>
<input class="form-control" id="choices-placeholder" type="text">
</div>
<div data-test-hook="within-form">
<form>
<label for="choices-within-form">Within form</label>
<input class="form-control" id="choices-within-form" type="text">
</form>
</div>
</div>
</div>
<script>
@ -134,6 +141,8 @@
placeholder: true,
placeholderValue: 'I am a placeholder',
});
new Choices('#choices-within-form');
});
</script>
</body>