You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2020/04/12 17:47:00 UTC
[jira] [Resolved] (WICKET-6768) TagTester#createTagsByAttribute()
cannot find hidden elements
[ https://issues.apache.org/jira/browse/WICKET-6768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier resolved WICKET-6768.
--------------------------------
Fix Version/s: 9.0.0-M6
Assignee: Sven Meier
Resolution: Fixed
> TagTester#createTagsByAttribute() cannot find hidden elements
> -------------------------------------------------------------
>
> Key: WICKET-6768
> URL: https://issues.apache.org/jira/browse/WICKET-6768
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 9.0.0-M5
> Reporter: Martin Tzvetanov Grigorov
> Assignee: Sven Meier
> Priority: Major
> Fix For: 9.0.0-M6
>
>
> Recently Wicket started using HTML 'hidden' attribute instead of style="display:none" to hide elements in a CSP compatible way.
> Wicket Bootstrap has a test case that was looking up an element by attribute
> {code}
> TagTester ulTag = tagTester.getChild("style", "display:none");
> {code}
> Migrating this to :
> {code}
> TagTester ulTag = tagTester.getChild("hidden", "");
> {code}
> does not work because TagTester#createTagsByAttribute() returns empty collection when the attribute value is empty:
> {code}
> public static List<TagTester> createTagsByAttribute(String markup, String attribute, String value, boolean stopAfterFirst)
> {
> if (Strings.isEmpty(attribute) || Strings.isEmpty(value)) {
> return Collections.emptyList();
> }
> ....
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)