Index: popups.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups/popups.js,v
retrieving revision 1.9.2.23
diff -u -r1.9.2.23 popups.js
--- popups.js	27 Feb 2009 01:08:33 -0000	1.9.2.23
+++ popups.js	27 Feb 2009 19:43:36 -0000
@@ -147,10 +147,13 @@
   var top = (windowHeight / 2) - (popupHeight / 2) + Drupal.popups.scrollTop();
 
   $popups.css('top', top).css('left', left); // Position the popups to be visible.
-  
-  this.refocus(); // TODO: capture the focus when it leaves the dialog.
-  Drupal.popups.removeLoading(); // Remove the loading img.
-   
+
+  // Remove the loading image.
+  Drupal.popups.removeLoading();
+
+  // Give focus to the first enabled element in the popup window.
+  $('#popups-body input:enabled:first').focus();
+
   return false;
 };
 
