}, config );
// Parent constructor
- mw.widgets.datetime.CalendarWidget[ 'super' ].call( this, config );
+ mw.widgets.datetime.CalendarWidget.super.call( this, config );
// Mixin constructors
OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, { $tabIndexed: this.$element } ) );
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' );
}
};
change = visible !== this.isVisible();
// Parent method
- mw.widgets.datetime.CalendarWidget[ 'super' ].prototype.toggle.call( this, visible );
+ mw.widgets.datetime.CalendarWidget.super.prototype.toggle.call( this, visible );
if ( change ) {
if ( visible ) {