this.rootElement = options.rootElement || document.documentElement;
Hi Simon,
that is almost the right place yes, if you have a look at core/modules/startup/startup.js
[1], you will see that it initializes it without the rootElement
being given anyway. The next problem is that all widgets
regardless of the window they are rendered in will use $tw.popup.triggerPopup()
,
so we can't have multiple popup handler (i.e. one per window).
The actual event listener however will be registered in $tw.popup.show()
.
As it stands I see two ways you could make the core properly handle this:
core/modules/startup/window.js
into $tw.openWindows
and make sure that all open
windows including the main one are listed there and then have
the Popup mechanism iterate through these and register itself
(to all of them).[1] https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/startup/startup.js#L118
[2] https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument
On 21 Feb 2018, at 19:07, Simon Huber <hypnotize...@gmail.com> wrote:
No - I'm not having success. Here I depend on help from above
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/31f5df4c-5e0b-4527-be06-7a6133f0f1f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Especially the tm-modal message: if I want to delete a tiddler in a new window, the modal to confirm the action appears in the root window, tm-notify acts the same way.