From: jenkins-bot Date: Tue, 29 Sep 2015 12:33:15 +0000 (+0000) Subject: Merge "OOjs UI: Backport d190bc51e60195eed81f147e9324c9ec21c9e68c" X-Git-Tag: 1.31.0-rc.0~9681 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=c7d134074704b1854ad956f98330b67b6b802733;hp=9c90b64b7d45f734f7c8c7561689c63d3ae5eab8;p=lhc%2Fweb%2Fwiklou.git Merge "OOjs UI: Backport d190bc51e60195eed81f147e9324c9ec21c9e68c" --- diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 42bf82196d..03c2c1d8ba 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -1,3 +1,11 @@ +/* + * Local backports: + * + * - d190bc51e60195eed81f147e9324c9ec21c9e68c + * FloatableElement: Don't try unbinding events before we bind them + * Required for mw.widgets.DateInputWidget when used with '$overlay' config option. + */ + /*! * OOjs UI v0.12.9 * https://www.mediawiki.org/wiki/OOjs_UI @@ -6933,8 +6941,10 @@ OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positionin // Initial position after visible this.position(); } else { - this.$floatableWindow.off( 'resize', this.onFloatableWindowResizeHandler ); - this.$floatableWindow = null; + if ( this.$floatableWindow ) { + this.$floatableWindow.off( 'resize', this.onFloatableWindowResizeHandler ); + this.$floatableWindow = null; + } if ( this.$floatableClosestScrollable ) { this.$floatableClosestScrollable.off( 'scroll', this.onFloatableScrollHandler );