many many moons ago there was a issue for this
https://github.com/Jermolene/TiddlyWiki5/pull/470
but the current method was chossen instead.
Another choice is to us a 'submit' type button:
\define img(url, width) <img src="$url$" height="50px" width="$width$"/>
<$list filter="""[tag[Image]]""">
<$vars curr=<<currentTiddler>>>
<$tiddler tiddler=dummy>
width: <$edit-text tiddler=temptid field=text tag="input"/>
</$tiddler>
</$vars>
</$list>
<$button>
<$action-setfield width={{temptid}}/>
set width
</$button>
<$macrocall $name=img url={{!!url}} width={{!!width}}/>
On Thursday, March 4, 2021 at 11:34:17 PM UTC+1 Mat wrote:
> BJ, big thanks. 'throttle.refresh' does improve things. In another version
> I'm using a RangeWidget to set the width and your trick works even better
> for that.
>
> As for "modify the core", do you think there is a real reasonable solution
> for this or is it one of those known issues that are stuck? Shoud I raise
> an Issue?
>
> Again, thank you!
>
> <:-)
>
> On Thursday, March 4, 2021 at 11:17:08 PM UTC+1 BJ wrote:
>
>> Hi Mat,
>> changes to a tiddler trigger the refresh mechanism - and if the tiddler
>> is displayed then it will be re-rendered, which destroy the underlying text
>> box in you case and then recreates it - and thus loses focus. If you add a
>> field called 'throttle.refresh' to your tiddler it will make things a
>> bit better, but there is no solution (outside of modify the core).
>>
>> all the best BJ
>> On Thursday, March 4, 2021 at 10:16:36 PM UTC+1 Mat wrote:
>>
>>> So this presents the problem:
>>>
>>> https://edittextcurrent.tiddlyhost.com/
>>>
>>> I'd appreciate it if anyone can take a look and tell me what I'm doing
>>> wrong. And I'm curious why the EditTextWidget is not tricked to believe it
>>> is elsewhere by the tiddler=dummy ...I thought that was kind of the point
>>> with the TiddlerWidget.
>>>
>>> <:-)
>>>
>>> On Thursday, March 4, 2021 at 6:57:33 PM UTC+1 Mat wrote:
>>>
>>>> That is *very* kind of you Mohammad.
>>>> I am just about to go out so will look closer after but it seems the
>>>> modified field is not in Pelican, where I wish it should be. Will
>>>> investigate later.
>>>> Thanks!!!
>>>> <:-)
>>>>
>>>> On Thursday, March 4, 2021 at 6:38:12 PM UTC+1 Mohammad wrote:
>>>>
>>>>> Mat
>>>>> Could you give a try on https://tiddlywiki.com/
>>>>> A sample template and example is attached!
>>>>>
>>>>>
>>>>> Best wishes
>>>>> Mohammad
>>>>>
>>>>>
>>>>> On Thu, Mar 4, 2021 at 8:22 PM Mat <[email protected]> wrote:
>>>>>
>>>>>> Thanx Mohammad.
>>>>>> It is in a template for modifying the <<currentWidget>>, so if I put
>>>>>> it in a separate tiddler I don't know what to type here:
>>>>>>
>>>>>> <$edit-text tiddler=??????? field=f/>
>>>>>>
>>>>>> To be more specific:
>>>>>>
>>>>>> All tiddlers that are tagged Image, have a htm <img> element to show
>>>>>> an image. The <img> tag has a width attribute. But this width of the
>>>>>> image should be possible to control - so I want a template to show a an
>>>>>> EditTextWidget above the image. This widget should show the width field
>>>>>> of the current tiddler.
>>>>>>
>>>>>> ...but this doesn't seem to work; it loses focus as soon as I type a
>>>>>> letter into the edittextwidget.
>>>>>>
>>>>>> <:-)
>>>>>>
>>>>>> On Thursday, March 4, 2021 at 3:04:59 PM UTC+1 Mohammad wrote:
>>>>>>
>>>>>>> Mat, I think by every input in the text box, TW refresh the tiddler!
>>>>>>> So, why no to use a temp tiddler then?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Best wishes
>>>>>>> Mohammad
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Mar 4, 2021 at 5:24 PM Mat <[email protected]> wrote:
>>>>>>>
>>>>>>>> It is a known issue that an EditTextWidget loses focus if it edits
>>>>>>>> the current tiddler (see doc tiddler
>>>>>>>> <https://tiddlywiki.com/prerelease/#EditTextWidget>, under
>>>>>>>> "Notes") I was expecting the TiddlerWidget to be able to prevent this
>>>>>>>> by
>>>>>>>> changing the context for the editor, but it doesn't work. Why doesn't
>>>>>>>> this
>>>>>>>> work and what should I do if I don't want to involve other (real)
>>>>>>>> tiddlers?
>>>>>>>>
>>>>>>>> <$vars curr=<<currentTiddler>>>
>>>>>>>> <$tiddler tiddler=dummy>
>>>>>>>> <$edit-text tiddler=<<curr>> field=f/>
>>>>>>>> </$tiddler>
>>>>>>>> </$vars>
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> <:-)
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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/df1785e9-a506-4099-8090-f3d59727a1e2n%40googlegroups.com
>>>>>>>>
>>>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/df1785e9-a506-4099-8090-f3d59727a1e2n%40googlegroups.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/7ee00a05-7b21-4122-86c5-d91cfcef43dfn%40googlegroups.com
>>>>>>
>>>>>> <https://groups.google.com/d/msgid/tiddlywiki/7ee00a05-7b21-4122-86c5-d91cfcef43dfn%40googlegroups.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/59c0773c-20d4-456b-be43-05a19953a766n%40googlegroups.com.