1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Fix action-navigate widget for undefined event (#3542)

we need to prevent the event from being undefined which happens when using `action-navigate` within a global keyboard shortcut
This commit is contained in:
BurningTreeC 2018-11-15 17:49:41 +01:00 committed by Jeremy Ruston
parent c5d4990cc5
commit 4f7297645d

View File

@ -55,6 +55,7 @@ NavigateWidget.prototype.refresh = function(changedTiddlers) {
Invoke the action associated with this widget
*/
NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {
event = event || {};
var bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),
suppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);
if(this.actionScroll === "yes") {