2019-06-28 17:27:36 +01:00
caption: tm-focus-selector
created: 20190628162542132
2023-07-31 04:01:44 -07:00
modified: 20230723215122038
2019-06-28 17:27:36 +01:00
tags: Messages
title: WidgetMessage: tm-focus-selector
type: text/vnd.tiddlywiki
The `tm-focus-selector` message sets the focus to the DOM element identified by the selector in the `param` parameter.
|!Name |!Description |
|param |Selector identifying the DOM element to be focussed |
2023-07-31 04:01:44 -07:00
|//{any other params}// |Any other parameters to be passed to the [[focus()|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus]] method as variables.|
2019-06-28 17:27:36 +01:00
2019-08-06 14:53:14 +01:00
<<.tip """Use preventScroll="true" to prevent the browser from scrolling to the focused element""">>