Bug Tracker

Ticket #2736 (closed bug: invalid)

Opened 7 months ago

Last modified 7 months ago

Attribute case sensitivity error

Reported by: jwerx Assigned to: anonymous
Type: bug Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: Attribute Case attr
Cc: jamwong@gmail.com Needs: Test Case

Description (last modified by davidserduke) (diff)

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.

Attachments

Change History

Changed 7 months ago by davidserduke

  • description changed from 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. to 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.

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.

Changed 7 months ago by davidserduke

  • need changed from Review to Test Case
  • description changed from 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. to 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.

Changed 7 months ago by davidserduke

  • status changed from new to closed
  • resolution set to invalid

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.

Note: See TracTickets for help on using tickets.