Update OOjs UI to v0.1.0-pre (8197f2cd2e)
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 15 Apr 2014 18:07:44 +0000 (11:07 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 15 Apr 2014 18:07:44 +0000 (11:07 -0700)
New changes:
036b066 Make demos point to symlinks to /dist and /lib for doc publishing needs
eba79af Followup d7cbc785a: focus iframe content div before open event
8197f2c Fix WindowSet#getCurrentWindow documentation

Change-Id: I98c539eb4bc35c04142e4dd196db4ad567ed741c

resources/lib/oojs-ui/oojs-ui.js
resources/lib/oojs-ui/oojs-ui.svg.css

index 958bc1c..3878a65 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (eca1fc20e7)
+ * OOjs UI v0.1.0-pre (8197f2cd2e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Fri Apr 11 2014 16:47:56 GMT-0700 (PDT)
+ * Date: Tue Apr 15 2014 11:07:39 GMT-0700 (PDT)
  */
 ( function ( OO ) {
 
@@ -1293,12 +1293,13 @@ OO.ui.Window.prototype.open = function ( data ) {
                        this.visible = true;
                        this.emit( 'opening', data );
                        this.setup( data );
-                       this.emit( 'open', data );
-                       this.opening = false;
                        // Focus the content div (which has a tabIndex) to inactivate
                        // (but not clear) selections in the parent frame.
-                       // Must happen after the window has opened.
+                       // Must happen after setup runs (otherwise focusing it doesn't work)
+                       // but before 'open' is emitted (so subclasses can give focus to something else)
                        this.frame.$content.focus();
+                       this.emit( 'open', data );
+                       this.opening = false;
                }, this ) );
        }
 
@@ -1453,7 +1454,7 @@ OO.ui.WindowSet.prototype.onWindowClose = function ( win, config ) {
 /**
  * Get the current window.
  *
- * @return {OO.ui.Window} Current window
+ * @return {OO.ui.Window|null} Current window or null if none open
  */
 OO.ui.WindowSet.prototype.getCurrentWindow = function () {
        return this.currentWindow;
index 7a7cffa..0353288 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (eca1fc20e7)
+ * OOjs UI v0.1.0-pre (8197f2cd2e)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Fri Apr 11 2014 16:47:56 GMT-0700 (PDT)
+ * Date: Tue Apr 15 2014 11:07:39 GMT-0700 (PDT)
  */
 
 /* Textures */