Ticket #218 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.
