diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index bf96c6fbd..d02748b28 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -44,7 +44,7 @@ exports.startup = function() { console.log("Error in selector: ",selector) } if(element && element.focus) { - element.focus(); + element.focus(event.paramObject); } }); // Install the scroller diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid index dc41ad393..b3cb9011d 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid @@ -9,4 +9,6 @@ The `tm-focus-selector` message sets the focus to the DOM element identified by |!Name |!Description | |param |Selector identifying the DOM element to be focussed | +|paramObject |Optional hashmap of additional parameters passed to the `focus` command | +<<.tip """preventScroll="true" prevents the browser from scrolling to the focused element""">>