jenkins-bot has submitted this change and it was merged. Change subject: Focus property input box when adding a statement via "global" "add" ......................................................................
Focus property input box when adding a statement via "global" "add" Bug: T76860 Change-Id: Iedfeb70b07b4287b855475ed33d280e79f5499fb --- M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index c50d0fd..f661279 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -401,6 +401,25 @@ if( e.target !== $claimgrouplistview.get( 0 ) ) { return; } + + $claimgrouplistview.one( + 'listviewenternewitem', + function( event, $claimlistview ) { + if( event.target === claimgrouplistview.$listview[0] ) { + $claimlistview.one( + // TODO: There should be a "claimlistviewafterstartediting" event. + 'claimviewafterstartediting.addtoolbar ' + + 'statementviewafterstartediting.addtoolbar', + function() { + var listview = claimgrouplistview.$listview.data( 'listview' ), + lia = listview.listItemAdapter(); + lia.liInstance( $claimlistview ).focus(); + } + ); + } + } + ); + claimgrouplistview.enterNewItem(); toolbarcontroller.registerEventHandler( -- To view, visit https://gerrit.wikimedia.org/r/178477 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iedfeb70b07b4287b855475ed33d280e79f5499fb Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater <henning.sna...@wikimedia.de> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits