Opened 12 years ago
Closed 12 years ago
#7467 closed defect (fixed)
RTL mode triggered when Prototype.js exists
Reported by: | tomagnew | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit | Version: | 1.1.1 |
Keywords: | prototype.js rtl sniff.js | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
We are finding numerous places where Dojo breaks if Prototype.js is present. This is another example.
The failure occurs in the HEAD version of dijit/_base/sniff.js
Here is the code that fails:
dojo._loaders.unshift(function(){ if(!dojo._isBodyLtr()){ html.className += " dijitRtl"; for(var p in classes){ if(classes[p]){ html.className += " " + p+"-rtl"; } } }
Somehow the dojo._isBodyLtr is false, and the <head> class gets several RTL classes inserted.
When prototype.js is removed, all works. Unfortunately this is not an option for our pages, given our use of prototype widgets.
To workaround this, we comment out the above logic.
Change History (7)
comment:1 Changed 12 years ago by
Component: | General → Dijit |
---|---|
Owner: | changed from anonymous to Adam Peller |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
matt russell pointed this out to me at OSCON, and was going to dig deeper ... a testcase is avialble in trunk: uncomment the line in themeTester linking prototype.js (we've had issues with them before) ... I get: lineHeight is not defined during parse, and also see several _rtl rules on the html element.
comment:4 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 12 years ago by
correcting myself: matthew's report was that Mootools was doing this, not prototype. but its clear _something_ is going wrong regardless.
comment:6 Changed 12 years ago by
Milestone: | tbd → 1.2 |
---|
so other toolkits are apparently mucking with Element.prototype, which makes our instanceof check in html.js gcs() invalid.
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
If you've got a self-contained example, that would be great.