Ticket #218 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

story.findContainingTiddler fails for macros used inside "tabs" sub-tiddlers

Reported by: UdoBorkowski Owned by: JeremyRuston
Priority: undefined Milestone: 2.1.3
Component: core Version:
Severity: undefined Keywords:
Cc:

Description

When story.findContainingTiddler(element) is called inside a macro that is used on a tiddler referenced in a <<tabs>> macro an error occurs.

This is because the subtree with the tabs and the tabContent is not yet attached to the document tree when the tiddler is wikified.

The fix is easy: in the config.macros.tabs.handler move the place.appendChild(wrapper) before the this.switchTab. I.e.:

config.macros.tabs.handler = function(place,macroName,params)
{
...
	if(!validTab)
		config.options[cookie] = params[1];
        place.appendChild(wrapper);
	this.switchTab(tabset,config.options[cookie]);
}

Change History

Changed 7 years ago by JeremyRuston

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:949

Note: See TracTickets for help on using tickets.