1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-05 04:18:01 +00:00

Fix linkcatcher message sending

We need to send messages to the parent so that we don’t set up an
infinite loop by sending `tw-navigate` messages. Also we need to pass
along the target of the navigation.
This commit is contained in:
Jermolene
2014-04-09 16:09:12 +01:00
parent ef03e5ce63
commit e5fe3f76ac

View File

@@ -69,10 +69,11 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
if(this.catchTo) {
this.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable("currentTiddler"));
}
if(this.catchMessage) {
this.dispatchEvent({
if(this.catchMessage && this.parentWidget) {
this.parentWidget.dispatchEvent({
type: this.catchMessage,
param: event.navigateTo
param: event.navigateTo,
navigateTo: event.navigateTo
});
}
if(this.catchSet) {