From 229a088f340c2b3112ca7f3dcbf24843f060423d Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 23 Feb 2016 17:03:45 +0000 Subject: [PATCH] Make surface measurable while activating If the surface is display:none then $.width always returns 0, which breaks features like FocusableNode's invisible icon. Bug: T127319 Change-Id: Ib157ffaeb56fca2bdc26868d830c4bf8feafa2a8 --- .../init/styles/ve.init.mw.DesktopArticleTarget.init.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css index cd88cef162..b27162bf27 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css @@ -32,11 +32,18 @@ .ve-activated #t-permalink, .ve-activated #p-coll-print_export, .ve-activated #t-cite, -.ve-activating .ve-ui-surface, .ve-deactivating .ve-ui-surface { 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 */ +.ve-activating .ve-ui-surface { + height: 0; + overflow: hidden; +} + .ve-activated #bodyContent, .ve-activated #firstHeading { opacity: 0.6;