I’ve got a search field that only takes effect after clicking an “Apply” button.
<$tiddler tiddler="$:/temp/BAM/Settings">
<$edit-text field="search_draft"/>
<$button class={{{ [{!!search_draft}!match{!!search}then[blinking]] }}} disabled={{{ [{!!search_draft}match{!!search}then[yes]else[no]] }}}>
<$action-setfield search={{!!search_draft}}/>
Apply
</$button>
Every time, the first time entering text in that search field, the focus would move away from the field right after typing the first character.
Never any focus issue after that first-time-first-keypress every time I used the TiddlyWiki instance.
The problem: the temporary tiddler, which doesn’t exist until something is typed in the field, gets created on the first keypress in that field. That causes the focus to move away from the field.
What I did: create that temporary tiddler on Startup of the TiddlyWiki instance.
Problem solved.