Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18022 closed defect (bug) (wontfix)

Author dropdown on post.php hangs in IE if number of usernames is large

Reported by: dbvista Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords:
Focuses: Cc:


When I visit wp-admin/posts.php to post a new article in Internet Explorer 8, and click the Author dropdown to try to change the author, and the dropdown contains many usernames (say, 1000), the dropdown does not open and the entire web page hangs. (This does not happen in Firefox.) After several seconds, IE displays this error dialog:

Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive.

Dismissing the dialog makes the web page come back to life; however, the dropdown does not open.

If you reduce the number of usernames in the dropdown, the problem goes away. This suggests that WordPress JavaScript is running very slowly, proportional to the number of usernames.

You may be tempted to think this is a Microsoft or IE problem, but here some evidence that it's a WordPress problem:

  1. I created a plain HTML page with a 5000-item dropdown, and the same IE browser displayed it immediately without any delay. This suggests the problem is unique to WordPress.
  1. The problem does not occur in Firefox (3.6.18). This suggests that WordPress has an IE-specific performance problem in some JavaScript code.
  1. Possible clue: If I remove the following line from wp-admin/admin-header.php, the problem disappears. This suggests WordPress is adding some kind of JavaScript processing to this dropdown that is slowing it down.
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',

Deactivating all plugins and changing theme to Twenty Ten does not affect the problem.

I posted about this in the forums first: http://wordpress.org/support/topic/author-dropdown-on-postphp-displays-ie-error-stop-running-this-script

Other people have reported this problem in version 3.2: http://wordpress.org/support/topic/cannot-edit-change-author-when-editing-blog-posts-with-word-press-324

I am happy to participate in solving this by running tests you come up with.

Change History (11)

#1 @rianjs
7 years ago

I can confirm that this remains a problem in IE9, despite the dramatic JScript performance improvements with the new Chakra engine.

This does not affect Firefox 4/5, Opera 11.5, or Chrome 12.0.*

#2 @xknown
7 years ago

It works for me on a clean install with 2165 users. I tested it on a Windows XP SP3 with Internet Explorer 8.00.6001.18702

Can you provide more details about your IE version and operating system?

#3 @dbvista
7 years ago

Thank you for your reply. I am running IE 8.0.7600.16385 on Windows Server 2008 R2 Enterprise.

#4 @dbvista
7 years ago

I have narrowed down the problem (a bit) to a JavaScript handler running on the div surrounding the dropdown:

<div class="meta-box-sortables" id="normal-sortables">

When I remove the event handlers from this div, the hanging problem goes away.

#5 @dbvista
7 years ago

Next clue: It's JavaScript associated with the "meta-box-sortables" class.

#6 @dbvista
7 years ago

It appears to be the mousedown event, as opposed to the click event, causing the problem. This jQuery line makes the problem go away:


#7 @dbvista
7 years ago

I have traced the problem to the file wp-includes/js/jquery/ui.mouse.js. The function _mouseDown() defined in this file contains the following line:

var [...] f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;

This is the line that is hanging on mousedown. So this is either a jQuery UI problem, or WordPress is calling jQuery in some bizarre way or context.

#8 @dbvista
7 years ago

It's the call to "add(a.target)" that is hanging.

#9 @dbvista
7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

I updated to WordPress 3.2.1 (with a newer jQuery) and the problem disappeared. So this appears to have been a jQuery UI bug.

#10 @dbvista
7 years ago

Final word on the subject:

It's not a jQuery UI bug, but a jQuery bug. It's fixed in jQuery 1.6.1.

#11 @kawauso
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.