> anyone?
>
> when I examine Popup.stack inside of my function, it's contains my popup,
> but when I call Popup.show(), nothing happens. I've also tried removing
> Popup.show() from the code, so that the Popup would remain in the stack, but
> when I examine Popup.stack globally (in the console), it's empty.
>
> This has to be some kind of scope issue, but I'm not sure.

It might be an *event handling* issue.  If you are invoking the popup
in response to a click on a link element (the typical usage), then you
need to stop the event from propagating after being handled by your
code; otherwise, the click event will also be processed by the
document 'body' event handlers, which automatically removes the popup
when clicking on the document's background.  As a result, even though
you create and show a popup, it is immediately removed, before the
click event handling is completed.

To avoid this unwanted processing, you need to make sure that the
'onclick' handler for your link does the following at the end of the
function:
        ev.cancelBubble=true;
        if(ev.stopPropagation) ev.stopPropagation();
        return false;
(where 'ev' is the standard event object passed in to the handler by
the browser).

Give it




-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to