YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528358 (closed defect)

Reporter


BP.Wang
Opened: 08/19/09
Last modified: 09/14/09
Status: closed
Type: defect
Resolution: fixed

Owner


Adam Moore
Target Release: 2.8.0
Priority: P3 (normal)
Summary: Event.js DOMReady bug
Description:

In Event.js,



if (EU.isIE) {
if (window !== window.top) {
document.onreadystatechange = function() {
if (document.readyState == 'complete') {
document.onreadystatechange = null;
EU._ready();
}
};
} else {
// doScroll method
}
..

window !== window.top should be self !== self.top or window != window.top

because window !== window.top is ALWAYS TRUE is ie!

Type: defect Observed in Version: development master
Component: Event Severity: S2 (high)
Assigned To: Adam Moore Target Release: 2.8.0
Location: Priority: P3 (normal)
Tags: iframe,domready Relates To:
Browsers: IE - All
URL: http://lifesinger.org/blog/2009/08/window-self-in-ie/
Test Information:

alert(window === window.top); // 1
alert(self === window.top); // 2
alert(self === window); // 3
alert(window == window.top); // 4
alert(typeof self === typeof window); // 5
alert(self == window); // 6

Run above lines in ie, will give you surprise.

Change History

Adam Moore

YUI Developer

Posted: 08/19/09
  • milestone changed to 2.8.0
  • priority changed to P3 (normal)
  • status changed from new to checkedin

George

YUI Developer

Posted: 09/14/09
  • status changed from checkedin to closed

2.8.0 has been released. All "checkedin" items are available for download in the official release. Status of "checkedin" items is being set to closed.

George

YUI Developer

Posted: 09/14/09
  • resolution changed to fixed