\define macro()
<$action-setfield $tiddler="Tiddler" text={{$:/state/tiddler}}/>
<$action-setfield $tiddler="$:/state/tiddler" text=""/>
\end
<$keyboard actions=<<macro>> key="enter">
<$edit-text tiddler="$:/state/tiddler" tag="input"/>
</$keyboard>Try typing some, and then hit enter only to see that there's no input event firing.
So the question is. Why does the edit-text widget not realizethat its tiddler is gone or the text of it deleted and thus not refresh accordingly?
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ac977126-7033-44af-b724-03bab9c34605%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This is actually related to the conditional in the edit widget that we discussed a few weeks ago.
The issue is that when the button is clicked the text edit has the focus, thus the conditional kicks in and prevents the update.
You’ll recall that the purpose of the conditional was to prevent the cursor/selection position being lost when the value for the text input is updated. So the fix would be to manually preserve the selection position across the update.
@Jeremy: There's one thing I don't quite understand though: Assume CL does his thing as in the OP, enters some text, hits enter, Tiddler gets created. Shouldn't switching some event like switching some tabs, etc... trigger a refresh on that input, now that it no longer has focus? That doesn't appear to be the case, though.
Anyway, happy to see this resolved, after all, even before the next release.Best wishes,Tobias.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7b2bf5a5-f9fd-40c5-964b-d1817cbf578f%40googlegroups.com.
Although switching tabs will trigger a refresh, the list of changed tiddlers will not include the state tiddler to which the edit widget is bound, and so the widget won’t refresh. Modifying $:/state/tiddler itself will trigger a refresh as expected.
Perhaps the edit-text widget as it is preventing a potential refresh to not lose the caret position could store the state title back to the "queue of touched tiddlers" so that once the preventing conditions are gone, i.e. the edit-text widget no longer has focus, the widget updates accordingly on the next refresh cycle, while repeatedly putting the title back to the queue under preventative conditions.
Best wishes,Tobias.--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2b177721-f30e-4db1-aee7-705c348330a1%40googlegroups.com.
I think that that may be more complex than just preserving the selection/cursor position.
Asked differently: Is it possible to push the state title back into the "touched tiddlers" without that immediately triggering another refresh cycle as a result of it?
I think that that may be more complex than just preserving the selection/cursor position.
Not sure what you may be referring to.
Best wishes,Tobias.--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2e5aef9b-6fd0-4291-96d5-afdbec74adc9%40googlegroups.com.
The original problem here can be fixed by updating SimpleEngine.prototype.setText() (and variants) to preserve the selection position during the update. That’s a fairly simple, Google-able problem.That approach fixes all the problems we’ve discussed without needing to do anything tricksy with the refresh mechanism.
The original problem here can be fixed by updating SimpleEngine.prototype.setText() (and variants) to preserve the selection position during the update. That’s a fairly simple, Google-able problem.That approach fixes all the problems we’ve discussed without needing to do anything tricksy with the refresh mechanism.Not sure if / when we'll ever need a more sophisticated handling like that for the simple editor. So, I'd probably wait for someone calling for it.
Best wishes,Tobias.--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/62640d0e-54ec-4c5b-9a34-b07e9f4b857c%40googlegroups.com.