Skip to main content

Bug Tracker

Side navigation

#2736 closed bug (invalid)

Opened April 23, 2008 05:11AM UTC

Closed May 01, 2008 06:45AM UTC

Last modified March 13, 2012 09:40AM UTC

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: jamwong@gmail.com
Blocked by: Blocking:
Description

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 (0)
Change History (4)

Changed April 23, 2008 06:31AM UTC by davidserduke comment:1

description: 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.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 April 23, 2008 06:32AM UTC by davidserduke comment:2

description: 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.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.
need: ReviewTest Case

Changed May 01, 2008 06:45AM UTC by davidserduke comment:3

resolution: → invalid
status: newclosed

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.

Changed March 13, 2012 09:40AM UTC by anonymous comment:4