Merge "Give focus to preview panel for keyboard scrolling"

This commit is contained in:
jenkins-bot 2017-01-03 17:58:32 +00:00 committed by Gerrit Code Review
commit 6599aaf3f4

View file

@ -217,6 +217,7 @@ ve.ui.MWSaveDialog.prototype.swapPanel = function ( panel, noFocus ) {
break; break;
case 'preview': case 'preview':
size = 'full'; size = 'full';
this.previewPanel.$element[ 0 ].focus();
break; break;
case 'review': case 'review':
size = 'larger'; size = 'larger';
@ -484,7 +485,10 @@ ve.ui.MWSaveDialog.prototype.initialize = function () {
padded: true padded: true
} ); } );
this.$previewViewer = $( '<div>' ).addClass( 'mw-body-content mw-content-' + mw.config.get( 'wgVisualEditor' ).pageLanguageDir ); this.$previewViewer = $( '<div>' ).addClass( 'mw-body-content mw-content-' + mw.config.get( 'wgVisualEditor' ).pageLanguageDir );
this.previewPanel.$element.append( this.$previewViewer ); this.previewPanel.$element
// Make focusable for keyboard accessible scrolling
.prop( 'tabIndex', 0 )
.append( this.$previewViewer );
// Conflict panel // Conflict panel
this.conflictPanel = new OO.ui.PanelLayout( { this.conflictPanel = new OO.ui.PanelLayout( {