mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Merge "Give focus to preview panel for keyboard scrolling"
This commit is contained in:
commit
6599aaf3f4
|
@ -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( {
|
||||||
|
|
Loading…
Reference in a new issue