Hi Jeremy,

Thank you for your answer: it lead me to switch to a more idiomatic code
for the UI, which wouldn't trigger the edit-text refresh!

Cheers,
-- Xavier Cazin


On Mon, Jan 27, 2020 at 7:08 PM Jeremy Ruston <[email protected]>
wrote:

> Hi Xavier
>
> I think this is the venerable problem of the focus/selection not being
> retained over a refresh cycle. The only way to avoid it at present is to
> ensure that the edit-text widget doesn’t get refreshed.
>
> Best wishes
>
> Jeremy.
>
> On 27 Jan 2020, at 16:50, Xavier Cazin <[email protected]> wrote:
>
> Hello everyone,
>
> I stumble on an issue that I can seem to solve by myself: in the code
> below, I need to set focus=yes to counter the lost of focus caused by the
> <$set> content refresh :
>
> <$set name=foo value=<<now format:"[UTC]YYYY-0MM-0DD@0hh:0mm:0ss">> >
>
> Refresh of the `foo` value: ''<<foo>>'' causes either //focus// or //user
> input// (when `focus=yes`) to be lost.
>
> <$edit-text tiddler="$:/state/foo" focus=yes tag=input placeholder="Try
> typing something" default=""/>
> </$set>
>
> But then the input text gets selected as it is typed, causing the next
> character to replace the previous one. Tested on 5.1.21 and
> 5.1.22-prerelease, on Firefox and Chrome. How would you solve this?
>
> Thanks in advance for your help!
>
> -- Xavier Cazin
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" 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/tiddlywiki/CADeSwYPUwP2jm1-aynHhaNtRSXttL%3DD6y9xWbVEUc75eWYSgQA%40mail.gmail.com
> <https://groups.google.com/d/msgid/tiddlywiki/CADeSwYPUwP2jm1-aynHhaNtRSXttL%3DD6y9xWbVEUc75eWYSgQA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" 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/tiddlywiki/7BBF3EB0-A866-4CD5-AB5F-FE0B0EEBF57A%40gmail.com
> <https://groups.google.com/d/msgid/tiddlywiki/7BBF3EB0-A866-4CD5-AB5F-FE0B0EEBF57A%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki/CADeSwYMfWRYgHWWaoNzF25mKg-xod%3DdbjtT-NLivP6POsXHGcg%40mail.gmail.com.

Reply via email to