You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/04/12 17:47:00 UTC
[jira] [Commented] (WICKET-6768) TagTester#createTagsByAttribute()
cannot find hidden elements
[ https://issues.apache.org/jira/browse/WICKET-6768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081871#comment-17081871 ]
ASF subversion and git services commented on WICKET-6768:
---------------------------------------------------------
Commit a1fed9f8cdb6ed92fe7d2271835aa0784a25f3ab in wicket's branch refs/heads/master from Sven Meier
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=a1fed9f ]
WICKET-6768 allow creating TagTester with empty attribute value
> 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
> Priority: Major
>
> 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)