I would think for the most-use cases where the token tree is used, there is only one textfield where it makes sense to insert tokens and it seems unnecessary to force users to click on it, before entering a token.
This small patch achieves that by defining a '#insert_target' property for the token tree.
I personally think it makes sense to move '#click_insert' into an array which holds multiple properties such as this one, #918892: Allow users to disable the 'scroll to textfield' when clicking a token in the tree UI, and I'd like to also have things like the caption message configurable, retain focus after click insert, etc.
That in the end is not for me to decide, though, and I'll comply and reroll whatever the wanted approach is.
Comment | File | Size | Author |
---|---|---|---|
#4 | token-insert_autofocus-1067690-4.patch | 1.52 KB | Andrew Answer |
|
Comments
Comment #1
tstoecklerOops. Now the patch.
Comment #2
tstoecklerAssigning to me.
Comment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 8 year old patch to token.js, token.module and token.pages.inc does not apply to the latest token 7.x-1.x-dev and if still applicable needs reroll.
Comment #4
Andrew Answer CreditAttribution: Andrew Answer as a volunteer commentedPatch re-rolled.