Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FYI: ID Collisions in Firefox 3

    Hi,

    consider following example code:

    Code:
    isc.HLayout.create({
    	ID: "content",
    	height:400,
    	width:"100%",
    	border: "1px solid grey",
    	showShadow: true,
    	shadowDepth:10,
    	animateTime: 2000,
    	members: [
    		isc.VLayout.create({
    			ID: "subnavContainer",
    			width:200,
    			height:"100%",
    			backgroundRepeat: "no-repeat",
    			appImgDir:"../images/",
    		    backgroundImage:"subnav.jpg"		
    			members:[]	
    		}),
    		isc.VLayout.create({		
    			ID: "cont2",
    			width:"100%",
    			height:"100%",
    			backgroundRepeat: "no-repeat",			
    			appImgDir:"../images/",
    		    backgroundImage:"mycontent.jpg",		
    			members:[]	
    		})	
    	]
    });
    .....
    I had the problem that my application doesn't show anything in Firefox 3. IE and Firefox 2 worked well.

    Finally I figured out that the ID "content" collides with something in Firefox 3.
    Firebug throws following error:

    Code:
    setting a property that has only a getter
    addGlobalID()([HLayout ID:content] ns=Object ID=content height=400 width=100%, undefined, undefined)ISC_Core.js (Linie 176)
    draw()(Object ID=content height=400 width=100%, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined)ISC_Core.js (Linie 1713)
    completeCreation()(Object ID=content height=400 width=100%, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined)ISC_Core.js (Linie 305)
    createRaw()(Object ID=content height=400 width=100%, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined)ISC_Core.js (Linie 197)
    application.js()()application.js (Linie 90)
    [Break on this error] _4[_1.ID]=_1;if(isc.globalsSnapshot)isc.globalsSnapshot.add(_1.ID)}
    So changing the ID just to e.g. "appContent" solved te problem.

    I hope I could help you with this information.

    #2
    Yup, very sloppy of Firefox to accidentally reserve some global IDs. We'll be catching this with a clearer warning in the next version.

    Comment


      #3
      We found yet another global ID that is making trouble: "statusbar". Once again only in FireFox 3. FF2 and IE6/7 are ok. In furter projects we'll strictly use prefixes in all of our IDs.

      Comment


        #4
        Probably best to just following this recommendation and creating a single global "app" object for all your globals.

        Comment

        Working...
        X