Bug Tracker

Modify

Ticket #2736 (closed bug: invalid)

Opened 6 years ago

Last modified 2 years ago

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@…
Blocking: Blocked by:

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.

Change History

comment:1 Changed 6 years ago by davidserduke

  • Description modified (diff)

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.

comment:2 Changed 6 years ago by davidserduke

  • need changed from Review to Test Case
  • Description modified (diff)

comment:3 Changed 6 years 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.

comment:4 Changed 2 years ago by anonymous

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.