mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-08 13:56:07 +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:
@@ -69,10 +69,11 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
|
|||||||
if(this.catchTo) {
|
if(this.catchTo) {
|
||||||
this.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable("currentTiddler"));
|
this.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable("currentTiddler"));
|
||||||
}
|
}
|
||||||
if(this.catchMessage) {
|
if(this.catchMessage && this.parentWidget) {
|
||||||
this.dispatchEvent({
|
this.parentWidget.dispatchEvent({
|
||||||
type: this.catchMessage,
|
type: this.catchMessage,
|
||||||
param: event.navigateTo
|
param: event.navigateTo,
|
||||||
|
navigateTo: event.navigateTo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(this.catchSet) {
|
if(this.catchSet) {
|
||||||
|
Reference in New Issue
Block a user