Prevent Side Bar iframe from Reloading (TW5)

60 views
Skip to first unread message

Nicholas Lacasse

unread,
Oct 15, 2015, 1:52:08 PM10/15/15
to TiddlyWiki
Summary:
I have an iframe in a sidebar tab but when the user switches to another tab and back it refreshes the page that was loaded preventing actual usability.


Details:
So this is my nearly-minimum working example: http://mwe.tiddlyspot.com/

If you open the 'Class Discussion' tab there's an iframe to the site GoSoapBox. Directly above the iframe is some text telling you what the access code is to the event. If you enter that code and press join, the event loads and you have access to some interactive features. The problem is, if you switch tabs (say to 'Notepad' or 'Contents') and then switch back to 'Class Discussion' it has reloaded the page and the event you were signed into is gone and you need to re-enter the access code.

This is not a problem if the user interacts with this feature from inside a the tiddler itself (if the tiddler is open in the story stream) and keeps the tiddler open. Is there some way I can apply this "non-refresh/don't discard" status that story tiddler's have to sidebar tabs?

Tobias Beer

unread,
Oct 15, 2015, 11:23:45 PM10/15/15
to TiddlyWiki
Hi Nicholas,

This modified tabs macro will allow what you want...
  1. overwrite the core tabs macro $:/core/macros/tabs with it
  2. give your tab tiddler a field retain-tab set to yes
Also made a pull request for it...

#2031 allows to retain tab contents
https://github.com/Jermolene/TiddlyWiki5/pull/2031

Best wishes,

— tb

Nicholas Lacasse

unread,
Oct 16, 2015, 7:13:46 AM10/16/15
to TiddlyWiki
Amazing. Works perfectly. Thank you very much!
Reply all
Reply to author
Forward
0 new messages