Opened 7 years ago

Last modified 7 years ago

#18400 closed defect

_WidgetBase: isLeftToRight() always returns false if dir prop is uppercase — at Initial Version

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.10.3
Component: Dijit Version: 1.10.2
Keywords: Cc:
Blocked By: Blocking:


If dir property in <html> element is uppercase dijit/_WidgetBase.isLeftToRight will always return fasle as it's checking this.dir == "ltr" (but this.dir = "LTR")

isLeftToRight: function(){
           // summary:
           //        Return this widget's explicit or implicit orientation (true for LTR, false for RTL)
           // tags:
           //        protected
           return this.dir ? (this.dir == "ltr") : domGeometry.isBodyLtr(this.ownerDocument); //Boolean

People usually put dir in lowercase, but the HTML specs, except for XHTML, allows for uppercase. The HTML4.01 spec mandates that the dir attribute is case insensitive [1], while the XHTML1.1 spec refers to it as lowercase [2]. The HTML5 spec [3] does also allow for case insensitive attributes [4].

[1] [2] [3] [4]

Change History (0)

Note: See TracTickets for help on using tickets.