Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with external plugin when opening node while in fullscreen mode #357

Open
phenomenal11 opened this issue May 29, 2020 · 4 comments
Labels
external Problem caused by interference with another plugin not nice Not a bug but it does negatively impact the user experience

Comments

@phenomenal11
Copy link

Hi,

For a past few weeks i have been using a modified version of TiddlyWiki known as StrollWiki (https://giffmex.org/stroll/stroll.html).
Tiddlymap works perfectly apart from one small caveat:
When you enter fullscreen mode in TiddlyMap in strollwiki and double click on a node it displays the following error:
Internal JavaScript Error Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser Uncaught TypeError: Cannot read property 'shiftKey' of undefined

I raised the issue with the creator of stroll but he didn't seem to know what maybe causing this issue.

Is there any possibility you may know what could be causing interference with tiddlymap functionality because then i'd be able to take it up with the creator and may get a faster solution.

I understand that it is not a problem from your side but any pointer may help.

@felixhayashi
Copy link
Owner

felixhayashi commented May 30, 2020

Hi @phenomenal11, the expected fullscreen node-double behaviour in TiddlyMap is that a modal is shown in which you can view/edit the tiddler. This behaviour is initiated by TiddlyMap dispatching an tm-edit-tiddler event.

By activating the developer console in your browser and also activating "pause on exceptions" you can inspect the error trace, which originates in the strollwiki code.

Selection_033

As you can see in this screenshot, in the strollwiki code exists a hook

$tw.hooks.addHook("th-editing-tiddler", function(event)

This hook allows plugins to inspect tiddlers before they are edited via the ''edit'' toolbar button.

It has an optional event property that gives a clue about the DOM event object that triggered the edit and it seems that stroll is assuming this event property always exist on the object and is trying to access this propery to check if the shiftkey was used:

var shiftKey = event.event.shiftKey;

However, in this case – since the event is not triggered by a dom node but programmatically – this property event is neither being set by TiddlyWiki nor TiddlyMap.

Solution options:

Hope this helps

@felixhayashi felixhayashi changed the title Internal javascript error Conflict with external plugin when opening node while in fullscreen mode May 30, 2020
@felixhayashi felixhayashi added not nice Not a bug but it does negatively impact the user experience external Problem caused by interference with another plugin labels May 30, 2020
@phenomenal11
Copy link
Author

Thanks for the response Felix. I'm clearly out of my depth here so i have forwarded this thread to the creator of StrollWiki hoping he'll be able to do something with it!!
Thanks again!!

@steveguil
Copy link

steveguil commented Sep 20, 2020

@felixhayashi - This is amazing!

Would you be willing to take Stroll into Git & manage it? Perhaps in collaboration with Joe Kroese & TiddlyRoam?

According to David Gifford, Stroll's creator, he is open to that.

I find myself like many others in forums & I suspect the trend will grow considering what I see with Roam, Zettlekasten, etc. I'm not a programmer & am fairly new to TW (wishing I had adopted it back when I first saw it ~2008!). Following multi-step instructions for adding plugins, changing event properties, adding dummy events... it's all intimidating.

If your Map package &/or TiddlyRoam, came with the ability to have the side-by-side viewing of tiddlers that is in Stroll (and any other aspects/plugins from there that you think would enhance user experience), I think many would love it!

@saqimtiaz
Copy link

@felixhayashi just an FYI that the issue with the $tw.hooks.addHook("th-editing-tiddler", function(event) hook in Stroll was resolved some time ago.

See: https://giffmex.org/stroll/stroll.html#%24%3A%2F_sq%2FStories%2FEditTiddlerHook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Problem caused by interference with another plugin not nice Not a bug but it does negatively impact the user experience
Projects
None yet
Development

No branches or pull requests

4 participants