Is this a regression or a known issue in 1.4.3+ and IE7/8?

Is this a regression or a known issue in 1.4.3+ and IE7/8?

Hi guys,

I'm one of the developers of WordPress. We use jQuery a lot in the admin. There's a problem that surfaced after upgrading from 1.4.2 to 1.4.4. This problem still exists in 1.5.1 and 1.5.2RC.

On the Edit Page screen in WordPress admin we have a drop-down containing all published pages. If the number of entries there is more than 300, IE7 and IE8 show an "Unresponsive Script" error when trying to use the drop-down (clicking on it). If the number of entries is just under 300, the drop-down eventually opens after some delay but trying to scroll it by dragging the scroll bar fails (clicking again). However in this case scrolling works properly when done with the mouse wheel.

According to IE8 Dev.Tools the problem is in the while loop in siblingCheck(). This function was introduced in jQuery 1.4.3 and is used in (the rewritten) sortOrder() function. In 1.4.2 sortOrder() is using createRange() for IE, in 1.4.3 it switched to comparing nodes.

I suspect this may be caused by some unoptimized code on that page. There have been a lot of code contributions from different authors over the years and while some JS is nicely optimized, other might be hopelessly expensive. I would welcome any suggestions on what to look for in order to fix this particular problem.

On the other hand drop-downs with over 300 items (that's 300 sibling DOM nodes) are quite rare, so perhaps there is an underlying problem in sortOrder() or siblingCheck() in 1.4.3+.


Ref: WordPress trac ticket