Input test field loses focus after one character

59 views
Skip to first unread message

Giannis Moutsinas

unread,
Mar 27, 2020, 4:19:25 PM3/27/20
to TiddlyWiki
Hi,

This is a minimal example. I created a new tiddler and added this to its text:
<$edit field="test"/>

I get a text field but when I try to type in it, it loses focus. So I can type one letter each time. Surprisingly I can paste anything successfully. Moreover it works if I am editing the tiddler and I preview the result.

Why is this happening? Is it a bug? I have the latest version of TW.

Mark S.

unread,
Mar 27, 2020, 4:51:20 PM3/27/20
to TiddlyWiki
You need to refer to a field in another tiddler, not the same tiddler that you're in.

If you really want to edit the current tiddler, then put the edit widget in some other tiddler and then transclude it like:

{{||MyEditorTiddler}}

This is explained somewhat briefly here (https://tiddlywiki.com/#EditTextWidget) :

In short the EditTextWidget can not change properties of the tiddler it is embedded in or part of. It can only change fields of other tiddlers. One could use ShadowTiddlers to accomplish the field storage if needed.

TonyM

unread,
Mar 27, 2020, 8:38:15 PM3/27/20
to TiddlyWiki
Giannis

Just to extend what mark said the reason is each time you change a tiddler. the change gets propagated throughout the wiki, 
at least where it is relevant. This is how everything in TiddlyWiki is always up to date, your changes are automatically updated.
Add a new item and it appears in a list immediately etc...

Editing the current tiddler would immediately update the display of itself, to address this the edit mode mechanism uses a draft
tiddler has[draft.of]] detects this in filters. When editing you are actually editing a different tiddler which is "committed" when done.
This also allows you to cancel the edit with X and the previous unedited version is "restored".

The fact is most of us want to make forms or interactive wikis for those who do not know tiddlywikis editor. If you make one tiddler edit
another this will be fine, or use marks method, but since tiddler titles represent something we like to change we often want to do what you wanted.

Pastes work because they are equivalent to one character and then you loose focus as things update. Typing on the other hand,
You loose focus every letter.

I have built a range of workarounds but all a inside more complex solutions than a simple edit. I continue to look for a simpler way.
And would like to see a feature to address this built into the core. It is but a simple technical issue to resolve but a complex user issue.

I so far I have not seemed to convince others with the tech skills how important this one improvement would be.

Keep asking Questions and we will help.

Regards
Tony

Giannis Moutsinas

unread,
Mar 28, 2020, 8:20:52 AM3/28/20
to TiddlyWiki
Thank you both. In my case it is not a serious setback.

I wanted a tiddler that is has a form which I fill in and after that I click a button and it creates a new tiddler. I was using the fields of the form to temporarily store the data I wanted the new tiddler to hold. Now I jaut use another tiddler to store the data and it works fine. :)

Reply all
Reply to author
Forward
0 new messages