mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-13 12:18:05 +00:00
* Pass the original event to invokeActionString * Update rootwidget.js
This commit is contained in:
@@ -40,9 +40,10 @@ exports.startup = function() {
|
||||
// Install the tm-focus-selector message
|
||||
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) {
|
||||
var selector = event.param || "",
|
||||
element;
|
||||
element,
|
||||
doc = event.event ? event.event.target.ownerDocument : document;
|
||||
try {
|
||||
element = document.querySelector(selector);
|
||||
element = doc.querySelector(selector);
|
||||
} catch(e) {
|
||||
console.log("Error in selector: ",selector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user