mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Add test for event.event.target being undefined in the tm-focus-selector listener (#5771)
This commit is contained in:
parent
960160b3a2
commit
f2e26927c1
@ -41,7 +41,7 @@ exports.startup = function() {
|
||||
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) {
|
||||
var selector = event.param || "",
|
||||
element,
|
||||
doc = event.event ? event.event.target.ownerDocument : document;
|
||||
doc = event.event && event.event.target ? event.event.target.ownerDocument : document;
|
||||
try {
|
||||
element = doc.querySelector(selector);
|
||||
} catch(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user