Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

InputTagHelper renders a closing tag for type="submit" and type="button" #1571

Closed
DamianEdwards opened this issue Nov 17, 2014 · 4 comments
Closed

Comments

@DamianEdwards
Copy link
Member

The InputTagHelper renders a closing tag when type is equal to "submit" or "button". It's likely this is the behavior for all types not specifically understood by the InputTagHelper after a quick glance at its code.

It's also possible the issue is that the state of TagHelperOuput.SelfClosing does not correctly reflect what is in the source CSHTML and thus the fact the element is already self-closed in the source is lost after parsing (in which case this should be a bug against the Razor repo).

<input type="submit" value="Log in" class="btn btn-default" /> becomes <input class="btn btn-default" type="submit" Value="Log in"></input>

@DamianEdwards DamianEdwards added this to the 6.0.0-beta2 milestone Nov 17, 2014
@yishaigalatzer
Copy link
Contributor

We should make sure that if there is content set by the taghelper we do need to render the end tag :)

@danroth27 danroth27 modified the milestones: 6.0.0-rc1, 6.0.0-beta2 Dec 11, 2014
@yishaigalatzer yishaigalatzer modified the milestones: 6.0.0-beta3, 6.0.0-rc1 Jan 15, 2015
@NTaylorMullen NTaylorMullen changed the title Tag Helpers: InputTagHelper renders a closing tag for type="submit" and type="button" InputTagHelper renders a closing tag for type="submit" and type="button" Jan 23, 2015
@ianhong
Copy link
Contributor

ianhong commented Feb 21, 2015

4bb85ee
and
23e6264715b0055218611b3f36ac45098f6b0fb1

@NTaylorMullen
Copy link
Member

@ianhong one of the commits is invalid.

@ianhong
Copy link
Contributor

ianhong commented Feb 23, 2015

The invalid commit number is a Razor one, and the actual commit is aspnet/Razor@23e6264

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants