diff --git a/webcompat/static/css/development/components/flash-message.css b/webcompat/static/css/development/components/flash-message.css index 94822cd48..2dd2ba96d 100644 --- a/webcompat/static/css/development/components/flash-message.css +++ b/webcompat/static/css/development/components/flash-message.css @@ -21,7 +21,7 @@ /* states */ .wc-FlashMessage.is-active { display:block; - z-index: 2; + z-index: 10; } /* modifier */ diff --git a/webcompat/static/js/lib/bugform.js b/webcompat/static/js/lib/bugform.js index 21e89ce8f..3540a7c09 100644 --- a/webcompat/static/js/lib/bugform.js +++ b/webcompat/static/js/lib/bugform.js @@ -102,10 +102,14 @@ function BugForm() { this.loaderImage.hide(); window.location.href = '/thanks/' + response.number; }, this), - error: function() { + error: _.bind(function(response) { var msg = 'There was an error trying to file the bug, try again?.'; - wcEvents.trigger('flash:error', {message: msg, timeout: 4000}); - } + if (response && response.status === 413) { + msg = 'The image is too big!\n Please choose something smaller than 4MB and try again.'; + } + wcEvents.trigger('flash:error', {message: msg, timeout: 5000}); + this.loaderImage.hide(); + }, this) }); };