mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +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:
parent
c5d4990cc5
commit
4f7297645d
|
@ -55,6 +55,7 @@ NavigateWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
Invoke the action associated with this widget
|
Invoke the action associated with this widget
|
||||||
*/
|
*/
|
||||||
NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||||
|
event = event || {};
|
||||||
var bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),
|
var bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),
|
||||||
suppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);
|
suppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);
|
||||||
if(this.actionScroll === "yes") {
|
if(this.actionScroll === "yes") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user