jenkins-bot has submitted this change and it was merged.

Change subject: Focus value input box when adding a statement to an existing 
statement group
......................................................................


Focus value input box when adding a statement to an existing statement group

Bug: T76860
Change-Id: Idd0ef14fd49761f577d47a8bf36ad5776e7878f2
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 0e966dd..aec6af1 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -440,6 +440,21 @@
                                if( e.target !== $claimlistview.get( 0 ) ) {
                                        return;
                                }
+
+                               $claimlistview.one( 'listviewenternewitem', 
function( event, $view ) {
+                                       if( event.target === 
claimlistview.$listview[0] ) {
+                                               $view.one(
+                                                       
'claimviewafterstartediting.addtoolbar '
+                                                       + 
'statementviewafterstartediting.addtoolbar',
+                                                       function() {
+                                                               var listview = 
claimlistview.$listview.data( 'listview' ),
+                                                                       lia = 
listview.listItemAdapter();
+                                                               lia.liInstance( 
$view ).focus();
+                                                       }
+                                               );
+                                       }
+                               } );
+
                                claimlistview.enterNewItem();
 
                                // Re-focus "add" button after having added or 
having cancelled adding a statement:

-- 
To view, visit https://gerrit.wikimedia.org/r/180077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd0ef14fd49761f577d47a8bf36ad5776e7878f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf12c
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to