Merge "Fix bug where the floating toolbar was on top of the save dialog"

This commit is contained in:
jenkins-bot 2013-06-28 00:23:15 +00:00 committed by Gerrit Code Review
commit efd5882f88
2 changed files with 11 additions and 0 deletions

View file

@ -114,6 +114,10 @@
overflow: visible;
}
.ve-init-mw-viewPageTarget-toolbarTracker-floating {
z-index: 100;
}
.ve-init-mw-viewPageTarget-saveDialog .ve-ui-buttonWidget {
float: right;
margin-left: 0.5em;

View file

@ -878,6 +878,13 @@ ve.init.mw.ViewPageTarget.prototype.onSurfaceToolbarPosition = function ( $bar )
dir = mw.config.get( 'wgVisualEditor' ).pageLanguageDir,
type = $bar.css( 'position' );
// HACK: If the toolbar is floating, also apply a floating class to the toolbar tracker
if ( $bar.parent().hasClass( 've-ui-toolbar-floating' ) ) {
this.$toolbarTracker.addClass( 've-init-mw-viewPageTarget-toolbarTracker-floating' );
} else {
this.$toolbarTracker.removeClass( 've-init-mw-viewPageTarget-toolbarTracker-floating' );
}
// It's important that the toolbar tracker has 0 height. Else it will block events on the
// toolbar (e.g. clicking "Save page") as it would overlap that space. The save dialog
// will remain visible for the same reason elsewhere: As long as we don't have overflow:hidden,