diff --git a/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css b/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css index af57c29306..8e6bab0f8e 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css +++ b/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css @@ -5,9 +5,8 @@ * @license The MIT License (MIT); see LICENSE.txt */ -.ve-ui-overlay { - /* enough to cover .overlay-header-container with z-index: 5 */ - z-index: 6; +.oo-ui-panelLayout-scrollable { + -webkit-overflow-scrolling: touch; } .ve-init-mw-target-surface .ve-ce-documentNode, @@ -40,7 +39,7 @@ display: none; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-actions { +.ve-init-mw-mobileArticleTarget-actions { float: none; display: table; } @@ -70,28 +69,33 @@ right: 0; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools { +.ve-init-mw-mobileArticleTarget-tools { display: table; width: 100%; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup { +.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup { display: table-cell; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup-empty { +.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup-empty { display: none; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup:last-child { +.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup:last-child { border-right: 0; } -.ve-init-mw-mobileArticleTarget-toolbar .oo-ui-toolbar-tools > .oo-ui-toolGroup > .oo-ui-toolGroup-tools +.ve-init-mw-mobileArticleTarget-tools > .oo-ui-toolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool { width: 100%; } +.ve-init-mw-mobileArticleTarget-tools-hidden, +.ve-init-mw-mobileArticleTarget-actions-hidden { + display: none; +} + @media (max-width: 479px) { .ve-init-mw-mobileArticleTarget-toolbar .oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-iconElement.oo-ui-tool-with-label > .oo-ui-tool-link .oo-ui-tool-title { diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js index b839d522e8..74b1b97302 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js @@ -93,8 +93,8 @@ ve.init.mw.MobileArticleTarget.prototype.onSurfaceReady = function () { */ ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () { var toolbar = this.getToolbar(); - toolbar.$group.addClass( 'oo-ui-element-hidden' ); - toolbar.$actions.removeClass( 'oo-ui-element-hidden' ); + toolbar.$group.addClass( 've-init-mw-mobileArticleTarget-tools-hidden' ); + toolbar.$actions.removeClass( 've-init-mw-mobileArticleTarget-actions-hidden' ); }; /** @@ -102,8 +102,8 @@ ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () { */ ve.init.mw.MobileArticleTarget.prototype.onSurfaceFocus = function () { var toolbar = this.getToolbar(); - toolbar.$group.removeClass( 'oo-ui-element-hidden' ); - toolbar.$actions.addClass( 'oo-ui-element-hidden' ); + toolbar.$group.removeClass( 've-init-mw-mobileArticleTarget-tools-hidden' ); + toolbar.$actions.addClass( 've-init-mw-mobileArticleTarget-actions-hidden' ); }; /** @@ -132,7 +132,7 @@ ve.init.mw.MobileArticleTarget.prototype.setupToolbar = function ( surface ) { this.toolbar.$element.addClass( 've-init-mw-mobileArticleTarget-toolbar' ); // Append the context to the toolbar - this.toolbar.$bar.append( surface.context.$element ); + this.toolbar.$bar.append( surface.getContext().$element ); }; /** @@ -160,15 +160,20 @@ ve.init.mw.MobileArticleTarget.prototype.attachToolbarSaveButton = function () { this.actionsToolbar.emit( 'updateState' ); - this.toolbar.$actions.append( - this.actionsToolbar.$element, - $( '