in partnership with mediatemple

Ticket #900 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Mootools Compatibility Breaks Frames

Reported by: kentongray Owned by: digitarald
Type: defect Priority: blocker
Milestone: Mootools version 1.2 Component: Core
Keywords: frames Cc:

Description

I know I'm probably the last developer on earth using frames, but I don't have much choice and it seems one of the recent nightly builds breaks the "target" attribute on frames... After I have loaded mootools

I have created a fairly simple test case to demonstrate this. It seems that it must be tied to the "compatibility" option on the latest mootools, because as you can see from the test case everything works fine on #1479

Let me know if you know of any workarounds, or if you need more information

Thanks!

Change History

Changed 2 months ago by kentongray

Sorry I guess no way to attach files, I have uploaded the sample here:

http://www.iofficecorp.com/uploads/mootools-frames-example/frames.htm

Just click through the links on top and when you hit Mootools #1479 compat frames will stop loading on the bottom frameset until you reload the whole frameset, if you need anymore information please let me know

Changed 2 months ago by kentongray

Ok, after comparing everything I've found the offending lines that break it, still don't know what the problem is though, but if I take this out:

window.extend = document.extend = function(properties){

for (var property in properties) this[property] = properties[property];

};
window.extend(Browser.Engine);

window.ie = window.trident;
window.ie6 = window.trident4;
window.ie7 = window.trident5;

Everything works, how was this done before? BTW this bug affects all the major browsers

Changed 2 months ago by kentongray

I'm kinda having a conversation with myself but I just replaced the offending code with this:
window.ie = $pick(Browser.Engine.trident,false);
window.ie6 = $pick(Browser.Engine.trident4,false);
window.ie7 = $pick(Browser.Engine.trident5,false);
window.gecko = Browser.Engine.gecko;
window.webkit = Browser.Engine.webkit;
window.webkit419 = Browser.Engine.webkit419;
window.webkit420 = Browser.Engine.webkit420;
window.opera = Browser.Engine.presto;

And everything works, not sure if there is some reason I shouldn't do that but it seems straight forward enough. I did the picks because I noticed that it was actually returning null/undefined instead of boolean like I expected

Changed 2 months ago by digitarald

  • owner set to digitarald

The $extend seems to be the problem, since it spits all its properties like "name" and "version" to the global namespace. That must break something!

Changed 2 months ago by digitarald

Fixed compat file, please review and commit:

window.extend = document.extend = function(properties){
	for (var property in properties) this[property] = properties[property];
};

window[Browser.Engine.name] = window[Browser.Engine.name + Browser.Engine.version] = true;

window.ie = window.trident;
window.ie6 = window.trident4;
window.ie7 = window.trident5;

Changed 2 months ago by kamicane

  • status changed from new to closed
  • resolution set to fixed

fixed in [1509]

Note: See TracTickets for help on using tickets.