[
https://issues.apache.org/jira/browse/JSPWIKI-1391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152272#comment-18152272
]
ASF subversion and git services commented on JSPWIKI-1391:
----------------------------------------------------------
Commit b8a96b280e4fce1b067d53a4453abc8f83f58398 in jspwiki's branch
refs/heads/master from spyhunter99
[ https://gitbox.apache.org/repos/asf?p=jspwiki.git;h=b8a96b280 ]
Merge pull request #660 from arturobernalg/bug/JSPWIKI-1391-add-css-flash
JSPWIKI-1391 Do not show the CSS of a %%add-css block before the script has run
> The CSS of a %%add-css block is shown until the script has run
> --------------------------------------------------------------
>
> Key: JSPWIKI-1391
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1391
> Project: JSPWiki
> Issue Type: Bug
> Components: Templates and UI
> Reporter: Arturo Bernal
> Priority: Major
> Labels: pull-request-available
>
> Reported by Jürgen Weber in JSPWIKI-1322 on 23 Nov: with a {{%%add-css}}
> block at the top of LeftMenu, the left menu shows the CSS source for a moment
> on reload.
> The server sends the CSS as plain text in a div with class add-css. The
> haddock stylesheet has no rule for it, so the div is displayed until
> AddCSS.js replaces it with a style element. The rule
> {noformat}
> .add-css { display:none }
> {noformat}
> exists only in jspwiki.css of the old 210 template.
> Reproduced on master (c429feb47) in headless Chromium with scripts disabled,
> which is what is shown before the script runs: the left menu shows the text
> {noformat}
> .breadcrumb{color:inherit}.pagename{color:transparent}
> {noformat}
> Fix: add
> {noformat}
> .add-css { display:none }
> {noformat}
> to the haddock less files. With it, the text is not shown with scripts
> disabled. With scripts enabled the style element is still inserted and the
> div is removed, as before.
> Not tested: Firefox, Edge, Safari, the form {{%%add-css [wikipage] /%}}, and
> the real timing of the flash.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)