/*!
- * OOUI v0.29.3
+ * OOUI v0.30.2
* https://www.mediawiki.org/wiki/OOUI
*
- * Copyright 2011–2018 OOUI Team and other contributors.
+ * Copyright 2011–2019 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2018-11-01T02:03:33Z
+ * Date: 2019-01-23T01:14:20Z
*/
( function ( OO ) {
* toolbar.$element,
* contentFrame.$element.append( $area )
* );
- * $( 'body' ).append( frame.$element );
+ * $( document.body ).append( frame.$element );
*
* // Here is where the toolbar is actually built. This must be done after inserting it into the
* // document.
* toolbar.$element,
* contentFrame.$element.append( $area )
* );
- * $( 'body' ).append( frame.$element );
+ * $( document.body ).append( frame.$element );
*
* // Here is where the toolbar is actually built. This must be done after inserting it into the
* // document.
*
* @private
* @param {jQuery.Event} e Mouse down event
+ * @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.Toolbar.prototype.onPointerDown = function ( e ) {
var $closestWidgetToEvent = $( e.target ).closest( '.oo-ui-widget' ),
*
* @param {string|Function} title Title text or a function that returns text
* @chainable
+ * @return {OO.ui.Tool} The tool, for chaining
*/
OO.ui.Tool.prototype.setTitle = function ( title ) {
this.title = OO.ui.resolveMsg( title );
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
+ * @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) {
if (
this.popup.connect( this, { toggle: 'onPopupToggle' } );
// Initialization
+ this.popup.setAutoFlip( false );
this.popup.setPosition( toolGroup.getToolbar().position === 'bottom' ? 'above' : 'below' );
this.$element.addClass( 'oo-ui-popupTool' );
this.popup.$element.addClass( 'oo-ui-popupTool-popup' );
* toolbar.$element,
* contentFrame.$element.append( $area )
* );
- * $( 'body' ).append( frame.$element );
+ * $( document.body ).append( frame.$element );
*
* // Here is where the toolbar is actually built. This must be done after inserting it into the
* // document.
*
* @protected
* @param {jQuery.Event} e Mouse up or key up event
+ * @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
if (
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
+ * @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyDown = function ( e ) {
var $focusable;
if ( e.which === OO.ui.Keys.TAB && !e.shiftKey ) {
$focusable = OO.ui.findFocusable( this.$group );
if ( $focusable.length ) {
- $focusable.focus();
+ $focusable.trigger( 'focus' );
return false;
}
}
* frame.$element.append(
* toolbar.$element
* );
- * $( 'body' ).append( frame.$element );
+ * $( document.body ).append( frame.$element );
* // Build the toolbar. This must be done after the toolbar has been appended to the document.
* toolbar.initialize();
*
* toolbar.$element,
* contentFrame.$element.append( $area )
* );
- * $( 'body' ).append( frame.$element );
+ * $( document.body ).append( frame.$element );
*
* // Here is where the toolbar is actually built. This must be done after inserting it into the
* // document.