Skip to content

Commit 680cbf2

Browse files
committed
Fix Bug 1123977 - www.mozilla.org contribute - error message on the category list could be displayed at a confusing position
1 parent baaa13d commit 680cbf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

media/js/mozorg/contribute/contribute-2015.js

+5
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@
149149
$('#inquiry-form input[name="category"]').on('change', function() {
150150
var $this = $(this);
151151
select_category($this);
152+
}).on('invalid', function() {
153+
// If no category is selected, the input element fires an invalid event
154+
// and shows an error tooltip when the user attempts to submit the form.
155+
// In that case, display the entire list so the user won't get confused.
156+
$('#inquiry-form .option-list').get(0).scrollIntoView();
152157
});
153158

154159
// If a category is checked at pageload, do the selection stuff

0 commit comments

Comments
 (0)