#2736 closed bug (invalid)
Attribute case sensitivity error
Reported by: | jwerx | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.4 |
Component: | core | Version: | 1.2.3 |
Keywords: | Attribute Case attr | Cc: | [email protected]… |
Blocked by: | Blocking: |
Description (last modified by )
Just a simple bug that I found.
Command________________________________Returned________
Setting the offsetLeft attribute.
$("#HelpText").attr("offsetLeft", 69); - Not implemented Error $("#HelpText").attr("offSetLeft", 69); - {...} works. $("#HelpText").attr("OFFSETLEFT", 69); - {...} works.
Retrieving the offsetLeft attribute
$("#HelpText").attr("offSetLeft") - "69" $("#HelpText").attr("offsetLeft") - "69" $("#HelpText").attr("oFfSEtLeft") - "69"
It appears when setting the value only the above case does not seem to work... I'm unsure about this.
Change History (4)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
Description: | modified (diff) |
---|---|
need: | Review → Test Case |
comment:3 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
I've looked at this a few times but still am not sure what the error is:
http://www.w3schools.com/Html/html_attributes.asp
Says:
Use Lowercase Attributes
Attributes and attribute values are case-insensitive. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation, and XHTML demands lowercase attributes/attribute values.
Further I read at:
http://msdn.microsoft.com/en-us/library/ms534200.aspx
that
"The property is read-only. The property has no default value."
It could be what you are doing is illegal and that is the problem. What browsers are you getting this problem in? Is this only an IE problem? I think it is because you are trying to set an attribute on a read only value which is causing IE to throw the error. I'm going to close it on that basis. If you have more info to share please feel free to reopen the ticket.
I can't claim to know the ins-and-outs of case sensitivity in attributes, so can you explain a bit more clearly what exactly the bug you see is?
Is it that case sensitivity doesn't matter? Or is there some specific case that you see as the problem?
I guess what would help most is a test case showing exactly what you expect to happen and exactly what is happening instead so we can make a more clear assessment of the problem.