www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit eecd625298005f7688ea3bc58f6b07b1b5ba1603
parent a315e4eced4cd9e1d10dc3c2b579115057f08bbe
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  2 Apr 2016 04:10:27 -0400

Populate both creator fields on Tab autocomplete select

Closes #926

Diffstat:
Mchrome/content/zotero/bindings/itembox.xml | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml @@ -1462,7 +1462,11 @@ params.creatorTypeID = creatorTypeID; } + // Return t.setAttribute('ontextentered', + 'document.getBindingParent(this).handleCreatorAutoCompleteSelect(this, true)'); + // Tab/Shift-Tab + t.setAttribute('onchange', 'document.getBindingParent(this).handleCreatorAutoCompleteSelect(this)'); }; t.setAttribute( @@ -1517,6 +1521,7 @@ --> <method name="handleCreatorAutoCompleteSelect"> <parameter name="textbox"/> + <parameter name="noAdvance"/> <body> <![CDATA[ var comment = false; @@ -1545,8 +1550,10 @@ textbox.getAttribute('fieldname').split('-'); // Stay focused - this._lastTabIndex = parseInt(textbox.getAttribute('ztabindex')) - 1; - this._tabDirection = 1; + if (noAdvance) { + this._lastTabIndex = parseInt(textbox.getAttribute('ztabindex')) - 1; + this._tabDirection = 1; + } var creator = Zotero.Creators.get(creatorID);