That looks pretty much like my example.  I can see your approach but do I 
have a guarantee that template if is being updated first, so that I could 
access it in the editableChanged callback?

Alessandro

On Saturday, January 17, 2015 at 12:28:24 PM UTC+1, David Waterman wrote:
>
> Ok, so this is about the timing of the template being invoked and when 
> you're checking? Where are you checking? I would be checking inside an 
> 'editableChanged' function, though I don't know if that would work either, 
> tbh.
>
> Any chance of a jsbin or something?
>
> I tried this to see :
>
> <http://jsbin.com/layenupohu/1/edit?html,output>
>
> Let me know if there's something I'm not understanding correctly.
>
> Max.
>
> On Sat Jan 17 2015 at 18:54:16 alessandro meyer <[email protected] 
> <javascript:>> wrote:
>
>> Hey Max
>>
>> Thanks for answering.
>>
>> I tried accessing it also through the templates ID but the doesnt work 
>> either because the input element is simply not present. Thats why I started 
>> using using setTimeout (see my second entry) which allows it to be added to 
>> the DOM meanwhile but it really feels hackish. I am looking for a on-load 
>> like callback on input-field. 
>>
>> Alessandro
>>
>>
>> On Saturday, January 17, 2015 at 11:46:02 AM UTC+1, David Waterman wrote:
>>
>>> How are you trying to access it? Can't you put a container around it and 
>>> use this.$.container.getElementById('editor'); ? As you say, the 
>>> element doesn't exist, so you can't use polymer's nice '$' to access 
>>> it...iinm. Perhaps you don't need the container, and can use the template's 
>>> ID?
>>>
>>> Max.
>>>
>>> On Sat Jan 17 2015 at 18:34:15 alessandro meyer <[email protected]> 
>>> wrote:
>>>
>> Hey there 
>>>>
>>>> I have the following situation
>>>>
>>>>     <template id="edit" bind if="{{ editable }}">
>>>>       <input id="editor" on-keyup="{{exit}}" value={{value}} />
>>>>     </template>
>>>>
>>>> And on editable being set to true, id like to focus() the input field 
>>>> how do I do that? Because the stuff in the template doesn't seem to be 
>>>> accessible earlier as I can't reach the <input> until it is visible.
>>>>
>>>> Thanks!
>>>>
>>>> Cheers
>>>> Alessandro
>>>>
>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Polymer" group.
>>>>
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>
>>>
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/polymer-dev/a7654552-68be-4dd9-9e20-a0ff1b0c05ab%
>>>> 40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/polymer-dev/a7654552-68be-4dd9-9e20-a0ff1b0c05ab%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>  Follow Polymer on Google+: plus.google.com/107187849809354688692
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/20fae5bc-3623-4151-93de-914609afd53c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/polymer-dev/20fae5bc-3623-4151-93de-914609afd53c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/3e059aea-9cf8-4ee9-97fd-9700b88e016a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to