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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user