#7443 closed feature (invalid)
Make .text()/.val() interchangable
Reported by: | john | Owned by: | john |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Right now there is a lot of confusion over when to use .text() or .val(). We could simplify it by making it such that .text() will set the value of input elements and textareas. No reason not to.
Change History (9)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Owner: | set to john |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
Keywords: | needsdocs added |
---|---|
Priority: | undecided → low |
comment:4 Changed 12 years ago by
comment:5 Changed 12 years ago by
Also, consider the XML/XHTML case in the code; this magic is only intended for HTML DOM documents that have a documented value
property, right? And there's #6478 that will break the proposed .text()
method.
comment:6 Changed 12 years ago by
A reason not to would be that it promotes using .text() to set the value of an input. Users could start thinking that it sets the value for everything, including <option>s, which is not the case. .text sets the text of an element and .val sets the value. Simple to understand. Just because we can promote bad coding standards doesnt mean its the right thing to do
comment:7 Changed 12 years ago by
Milestone: | → 1.next |
---|---|
Status: | assigned → pending |
Version: | 1.4.3 → 1.5 |
I also think there is no real need to do this, do we still want to do this? John?
comment:8 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:9 Changed 12 years ago by
Keywords: | needsdocs removed |
---|
See also #6827.