Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Bug 1123977 - www.mozilla.org contribute - error message on the c…
…ategory list could be displayed at a confusing position
  • Loading branch information
kyoshino committed Jan 23, 2015
1 parent baaa13d commit 680cbf2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions media/js/mozorg/contribute/contribute-2015.js
Expand Up @@ -149,6 +149,11 @@
$('#inquiry-form input[name="category"]').on('change', function() {
var $this = $(this);
select_category($this);
}).on('invalid', function() {
// If no category is selected, the input element fires an invalid event
// and shows an error tooltip when the user attempts to submit the form.
// In that case, display the entire list so the user won't get confused.
$('#inquiry-form .option-list').get(0).scrollIntoView();
});

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

0 comments on commit 680cbf2

Please sign in to comment.