The first thing to do is to find the tiddler that actually renders the “upcoming” interface. Starting from Demo…
-
Demo transcludes $:/plugins/nico/projectify/ui/dashboard/Dashboard (a shadow tiddler from the Projectify plugin)
-
$:/plugins/nico/projectify/ui/dashboard/Dashboard displays a tabset that uses $:/state/py-dashboard-selected-tab--1161634302 to track the currently selected tab.
- Selecting the “upcoming” tab sets the
$:/state/... tiddler’s contents to $:/plugins/nico/projectify/ui/dashboard/Upcoming (another shadow tiddler from Projectify)
The “…/Upcoming” tiddler contains the following code:
<$let fromDate={{!!from.date}} toDate={{!!to.date}} priority={{!!priority}} textQuery={{!!text.query}} >
<$transclude tiddler="$:/plugins/nico/projectify/ui/forms/TodoListFilters" mode="inline"/>
and $:/plugins/nico/projectify/ui/forms/TodoListFilters contains this line:
<<lingo Search>> <$edit-text size=12 field="text.query"/>    
Note how the first code snippet uses $let to fetch the textQuery variable from {{!!text.query}} but the second code snippet renders the $edit-text to enter the value for the text.query field. This is the origin of the “loss of focus” problem.
Note also that $:/plugins/nico/projectify/ui/forms/TodoListFilters does not reference the textQuery variable. This suggests that we should be able to safely swap those two lines in …/Upcoming, like this:
<$transclude tiddler="$:/plugins/nico/projectify/ui/forms/TodoListFilters" mode="inline"/>
<$let fromDate={{!!from.date}} toDate={{!!to.date}} priority={{!!priority}} textQuery={{!!text.query}} >
Doing so should avoid the loss of focus issue, since the $edit-text widget no longer occurs within the $let widget.
-e