TW5-Navigator and Preview in the same wiki?

81 views
Skip to first unread message

Swicky

unread,
Mar 1, 2019, 4:21:34 PM3/1/19
to TiddlyWiki
Hello! I'm trying to put BurningTreeC's Navigator plugin and Tobibeer's Preview plugin in the same wiki. However, I'm having a little trouble, and can't figure out why.

With Navigator, escapecss[] (Navigator's dependency), and Appear (Preview's dependency) in the wiki, it breaks. If I import these into an empty, same problem. It shows this error:

Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
TypeError: this.cancel is not a function

But only once I click. I can use hotkeys all I like, but as soon as I click, that error pops up. It's really weird..

In addition, you might have noticed this error is with Navigator and Appear. I'd like to know what's causing this, how to fix it, and if anything else might stop working once I add Preview itself.

Any help appreciated! (Also, sorry if any of these names are off - please correct me!)

BurningTreeC

unread,
Mar 1, 2019, 5:13:36 PM3/1/19
to TiddlyWiki
Hi @Swicky,

Tobibeer's preview plugin overwrites the same shadow tiddler as the navigator plugin ($:/core/modules/utils/dom/popup.js)

the preview plugin relies on the "cancel" method in its popup.js, which is not there in the navigator-popup.js ... the navigator plugin has a different popup mechanism ... it's experimental

so I'd recommend no using the navigator. it has some nice functionality and whenever possible I try making parts of it ready for a pull request to be merged with the core, but it's not thaaat easy ...

as you noticed, it's sensible not to break other plugins, keeping backwards compatibility ... the navigator is a little black sheep in that context. it's more a that-would-be-nice-to-have demo

I'm more and more trying not to overwrite core shadow tiddlers, the navigator though overwrites a whole bunch of them


best wishes,
btc

Swicky

unread,
Mar 2, 2019, 3:36:06 PM3/2/19
to tiddl...@googlegroups.com
Well, that sucks. :(

I don't really need the popups from Navigator, though. In fact, I only want a few of the features:
  • Moving through story river with keyboard
  • Editing selected tiddler with keyboard
  • Tabbing into the body when editing a tiddler
  • Moving through tag suggestions/search results with arrow keys
Would I be able to pull these features out of the plugin on their own, and if so, where would you suggest I look?

If you think it still can't work, thank you anyways! I would love to know if you have any suggestions for plugins with those features.
Reply all
Reply to author
Forward
0 new messages