mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Merge "Don't wait for surface to blur before hiding pageToolbar"
This commit is contained in:
commit
919f74f10b
|
@ -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 */
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue