[Dojo-checkins] [dojo] #5197: (Firefox only) hidden iframes can throw exceptions when testing dojo._isBodyLtr()

dojo trac at dojotoolkit.org
Mon Nov 19 18:00:29 UTC 2007


#5197: (Firefox only) hidden iframes can throw exceptions when testing
dojo._isBodyLtr()
-------------------+--------------------------------------------------------
 Reporter:  guest  |        Type:  defect
   Status:  new    |    Priority:  normal
Milestone:         |   Component:  Dijit 
  Version:  1.0    |    Severity:  normal
 Keywords:         |  
-------------------+--------------------------------------------------------
 the dojo._isBodyLtr() is added to my custom code base when I build
 (presumably by dijit), i'm not sure where this added:
 {{{
 if(!dojo._hasResource["dijit._base.bidi"]){ //_hasResource checks added by
 build. Do not use _hasResource directly in your code.
 dojo._hasResource["dijit._base.bidi"] = true;
 dojo.provide("dijit._base.bidi");

 // summary: applies a class to the top of the document for right-to-left
 stylesheet rules

 dojo.addOnLoad(function(){
         if(!dojo._isBodyLtr()){
                 dojo.addClass(dojo.body(), "dijitRtl");
         }
 });

 }}}


 In anycase when this is called the subsequent {{{dojo._bodyLtr =
 dojo.getComputedStyle(dojo.body()).direction == "ltr" }}} returns null on
 an iframe that is wrapped in a hidden div (see attached test files).

-- 
Ticket URL: <http://trac.dojotoolkit.org/ticket/5197>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list