Merge "ve.ce.MWGalleryNode: Ensure we always have a focusable element"

This commit is contained in:
Jforrester 2018-02-22 00:33:23 +00:00 committed by Gerrit Code Review
commit 2e87e03a29

View file

@ -38,8 +38,8 @@ ve.ce.MWGalleryNode.static.primaryCommandName = 'gallery';
* @inheritdoc ve.ce.GeneratedContentNode
*/
ve.ce.MWGalleryNode.prototype.getFocusableElement = function () {
var $gallery = this.$element.find( '.gallery' ).addBack( '.gallery' );
return $gallery.length ? $gallery.children() : this.$element;
var $gallery = this.$element.find( '.gallery' ).addBack( '.gallery' ).children();
return $gallery.length ? $gallery : this.$element;
};
/**