Merge "Don't wait for surface to blur before hiding pageToolbar"

This commit is contained in:
jenkins-bot 2018-08-29 01:58:14 +00:00 committed by Gerrit Code Review
commit 919f74f10b
2 changed files with 8 additions and 7 deletions

View file

@ -33,9 +33,9 @@
display: none;
}
/* The surface needs to be measurable while being setup
as some nodes render based on their dimensions, e.g.
ve.ce.FocusableNode#updateInvisibleIcon */
/* The surface needs to be measurable but not visible while
being setup as some nodes render based on their dimensions,
e.g. ve.ce.FocusableNode#updateInvisibleIcon */
.ve-activating .ve-ui-surface {
height: 0;
padding: 0 !important; /* stylelint-disable-line declaration-no-important */

View file

@ -103,8 +103,7 @@ ve.init.mw.MobileArticleTarget.prototype.surfaceReady = function () {
* Handle surface blur events
*/
ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () {
var toolbar = this.getToolbar();
toolbar.$group.addClass( 've-init-mw-mobileArticleTarget-editTools-hidden' );
this.getToolbar().$group.addClass( 've-init-mw-mobileArticleTarget-editTools-hidden' );
this.pageToolbar.$element.removeClass( 've-init-mw-mobileArticleTarget-pageToolbar-hidden' );
};
@ -112,8 +111,7 @@ ve.init.mw.MobileArticleTarget.prototype.onSurfaceBlur = function () {
* Handle surface focus events
*/
ve.init.mw.MobileArticleTarget.prototype.onSurfaceFocus = function () {
var toolbar = this.getToolbar();
toolbar.$group.removeClass( 've-init-mw-mobileArticleTarget-editTools-hidden' );
this.getToolbar().$group.removeClass( 've-init-mw-mobileArticleTarget-editTools-hidden' );
this.pageToolbar.$element.addClass( 've-init-mw-mobileArticleTarget-pageToolbar-hidden' );
};
@ -218,6 +216,9 @@ ve.init.mw.MobileArticleTarget.prototype.attachToolbarSaveButton = function () {
this.pageToolbar.$group.addClass( 've-init-mw-mobileArticleTarget-pageTools' );
this.toolbar.$group.addClass( 've-init-mw-mobileArticleTarget-editTools' );
// Don't wait for the first surface focus/blur event to hide one of the toolbars
this.onSurfaceBlur();
};
/**