I have posted example code changes to implement this [IDEA], and Jeremy has added a PR (with somewhat different code, but achieving the same end goals). This will likely be committed for v5.2.6. See Add focusSelect attribute to <$edit-text> widget by Jermolene ¡ Pull Request #7222 ¡ Jermolene/TiddlyWiki5 ¡ GitHub for the pull request, and https://tiddlywiki5-git-edit-text-focus-select-attribute-jermolene.vercel.app/ for the pre-commitment build.
Usage:
When an $edit-text widget has focus="yes", you can use an additional parameter, focusSelect, to control how initial selection is applied:
-
focusSelect="yes" (default) - Selects the entire edit control contents
-
focusSelect="start" - No selection is made. The cursor is placed at the start of the edit control contents
-
focusSelect="no" - No selection is made. The cursor is placed at the end of the edit control contents
-
focusSelect="end" - No selection is made. The cursor is placed at the end of the edit control contents
Note that this new handling is only applied if the $edit-text widget is of type âtextâ (default), âsearchâ, âURLâ, âtelâ or âpasswordâ. For any other specified type or any unrecognized value of focusSelect, the current behavior is applied (i.e., the entire edit control contents is selected if focus="yes" is used)
enjoy,
-e