jquery-form / jquery-form/form
TagName in Element Undefined
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.1k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hallo!
If in this function it finds an element without tagName it gives an error for being undefined.
$.fn.resetForm = function() {
return this.each(function() {
var el = $(this);
**var tag = this.tagName;**
I believe that it can happen in other places that also use tagName.
Greetings
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating $.fn.resetForm and inspect the highlighted this.tagName access, then identify how an element without tagName reaches this function. Reproduce the reported error and check whether other tagName uses are affected. Done means the undefined case is handled without breaking form reset behavior, with regression coverage if the repository provides a relevant test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100