Merge "installer: Add a defined check to overrideConfig method"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets.datetime / CalendarWidget.js
index 3ad6e29..b545164 100644 (file)
        mw.widgets.datetime.CalendarWidget.prototype.onPrevClick = function () {
                this.setFocusedDate( this.adjustDate( this.getFocusedDate(), 'month', -1 ) );
                if ( !this.$widget || OO.ui.contains( this.$element[ 0 ], document.activeElement, true ) ) {
-                       this.$element.focus();
+                       this.$element.trigger( 'focus' );
                }
        };
 
        mw.widgets.datetime.CalendarWidget.prototype.onNextClick = function () {
                this.setFocusedDate( this.adjustDate( this.getFocusedDate(), 'month', 1 ) );
                if ( !this.$widget || OO.ui.contains( this.$element[ 0 ], document.activeElement, true ) ) {
-                       this.$element.focus();
+                       this.$element.trigger( 'focus' );
                }
        };
 
                this.setFocusedDate( $button.getData() );
                this.setSelected( [ $button.getData() ] );
                if ( !this.$widget || OO.ui.contains( this.$element[ 0 ], document.activeElement, true ) ) {
-                       this.$element.focus();
+                       this.$element.trigger( 'focus' );
                }
        };