Opened 13 years ago

Closed 13 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 bill)

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:

		html.className += " dijitRtl";
		for(var p in classes){
				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 13 years ago by bill

Component: GeneralDijit
Owner: changed from anonymous to Adam Peller

comment:2 Changed 13 years ago by Adam Peller

If you've got a self-contained example, that would be great.

comment:3 Changed 13 years ago by dante

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 13 years ago by bill

Description: modified (diff)

comment:5 Changed 13 years ago by dante

correcting myself: matthew's report was that Mootools was doing this, not prototype. but its clear _something_ is going wrong regardless.

comment:6 Changed 13 years ago by Adam Peller

Milestone: tbd1.2

so other toolkits are apparently mucking with Element.prototype, which makes our instanceof check in html.js gcs() invalid.

comment:7 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [14925]) Avoid instanceof check on Element for prototype.js compatibility. Fixes #7467 !strict

Note: See TracTickets for help on using tickets.