jenkins-bot has submitted this change and it was merged. Change subject: Make sure there is a page before focusing in BookletLayout ......................................................................
Make sure there is a page before focusing in BookletLayout Get the test for whether a page is set at all outside the inner condition, so the test encompasses other cases where page may not be defined and therefore should not be focused. Bug: T87787 Change-Id: I8d1dc6d5137a205c338b47d44154ff524f130c45 --- M src/layouts/BookletLayout.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/src/layouts/BookletLayout.js b/src/layouts/BookletLayout.js index 60243ea..8bcb160 100644 --- a/src/layouts/BookletLayout.js +++ b/src/layouts/BookletLayout.js @@ -141,9 +141,9 @@ if ( !page && this.outlined ) { this.selectFirstSelectablePage(); page = this.stackLayout.getCurrentItem(); - if ( !page ) { - return; - } + } + if ( !page ) { + return; } // Only change the focus if is not already in the current page if ( !page.$element.find( ':focus' ).length ) { -- To view, visit https://gerrit.wikimedia.org/r/187264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d1dc6d5137a205c338b47d44154ff524f130c45 Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits