Kaldari has submitted this change and it was merged.

Change subject: (bug 30649) scroll to first error on clicking 'next'
......................................................................


(bug 30649) scroll to first error on clicking 'next'

on clicking 'Next' we scroll to the topmost error, the user can click this
several times to go the next erorrs and so on.

bug: 30649
Change-Id: Ib0561f5f93f60ada0bd0206be742c6aad79d9e2f
---
M resources/mw.UploadWizard.js
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Kaldari: Verified; Looks good to me, approved



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index e044053..f044b72 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1109,6 +1109,8 @@
                var errorCount = $errorElements.length;
                if ( errorCount > 0 ) {
                        $( '#mwe-upwiz-details-error-count' ).msg( 
'mwe-upwiz-details-error-count', errorCount, this.uploads.length );
+                       // Scroll to the first error
+                       $( 'html, body' ).animate( { scrollTop: $( 
$errorElements[0] ).offset().top - 50 }, 'slow' );
                } else {
                        $( '#mwe-upwiz-details-error-count' ).empty();
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/52636
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0561f5f93f60ada0bd0206be742c6aad79d9e2f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Eloquence <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: Nischayn22 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to