diff options
author | James D. Forrester <jforrester@wikimedia.org> | 2014-04-15 11:07:44 -0700 |
---|---|---|
committer | James D. Forrester <jforrester@wikimedia.org> | 2014-04-15 11:07:44 -0700 |
commit | 01a2682a86502d3ea2f6b3bdaea9991987bb7273 (patch) | |
tree | 76d838b443c18d09027a8f2ae7fd395d2c7d1245 /resources/lib/oojs-ui/oojs-ui.js | |
parent | 85d4e39ff096d05386fd2f333cd6acea66ad6f90 (diff) | |
download | mediawikicore-01a2682a86502d3ea2f6b3bdaea9991987bb7273.tar.gz mediawikicore-01a2682a86502d3ea2f6b3bdaea9991987bb7273.zip |
Update OOjs UI to v0.1.0-pre (8197f2cd2e)
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
Diffstat (limited to 'resources/lib/oojs-ui/oojs-ui.js')
-rw-r--r-- | resources/lib/oojs-ui/oojs-ui.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 958bc1c4d481..3878a65b4a38 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -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; |