Update OOUI to v0.26.4
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-windows.js
index dd306fa..e098a82 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOUI v0.26.3
+ * OOUI v0.26.4
  * https://www.mediawiki.org/wiki/OOUI
  *
  * Copyright 2011–2018 OOUI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2018-04-10T22:15:39Z
+ * Date: 2018-04-17T22:23:58Z
  */
 ( function ( OO ) {
 
@@ -1134,8 +1134,16 @@ OO.ui.WindowManager.prototype.onWindowResize = function () {
  * @param {jQuery.Event} e Window resize event
  */
 OO.ui.WindowManager.prototype.afterWindowResize = function () {
+       var currentFocusedElement = document.activeElement;
        if ( this.currentWindow ) {
                this.updateWindowSize( this.currentWindow );
+
+               // Restore focus to the original element if it has changed.
+               // When a layout change is made on resize inputs lose focus
+               // on Android (Chrome and Firefox). See T162127.
+               if ( currentFocusedElement !== document.activeElement ) {
+                       currentFocusedElement.focus();
+               }
        }
 };