Skip to content

Go to Definition on tag helper doesn't work for wildcard attributes #12210

@davidwengier

Description

@davidwengier

Then there is a bug if the tag already has other tag helpers.

This works:

<label for="test" foo="1">test</label>

This does not:

<label asp-for="test" foo="1">test</label>

Sample tag helper:

[HtmlTargetElement("*", Attributes = FooAttributeName)]
public class FooTaghelper: TagHelper
{
    private const string FooAttributeName = "foo";

    public override void Process(TagHelperContext context, TagHelperOutput output)
    {
        output.Attributes.Add("foo", "bar");
    }
}

Originally posted by @ChrisVanDijk in #12208

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions