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.
print-window-tiddler
Jermolene 2014-04-09 16:09:12 +01:00
rodzic ef03e5ce63
commit e5fe3f76ac
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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) {