Nikki added a comment.

  In case it's useful to anyone else, I cobbled together the following bit of 
code last night and put it in my common.js:
  
    mw.hook('wikibase.entityPage.entityView.rendered').add(function () {
        /* focus lexeme form when editing */
        $(".wikibase-lexeme-form .wikibase-toolbar-button-edit 
a").each(function() {
                var id = $(this).parents(".wikibase-lexeme-form").attr("id");
                $(this).on("click", function() {
                        setTimeout(function() {
                                
$("#"+id).find(".representation-widget_representation-value-input").eq(0).trigger("focus");
                        }, 500);
                });
        });
    
        /* focus lexeme lemma when editing */
        $(".lemma-widget_edit").on("click", function() {
                setTimeout(function() {
                        
$(".lemma-widget_lemma-value-input").eq(0).trigger("focus");
                }, 500);
        });
    });
  
  It only works for editing lemmas and existing forms, since that's all what I 
was trying to edit at the time.

TASK DETAIL
  https://phabricator.wikimedia.org/T201588

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Nikki
Cc: Nikki, Manu1400, Jan_Dittrich, KaMan, Lydia_Pintscher, Lea_Lacroix_WMDE, 
cristiana023, JanJaquemot, darthmon_wmde, Nandana, Mringgaard, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, JGirault, 
Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to