diff --git a/common/Makefile b/common/Makefile index c551ec66..955d358a 100644 --- a/common/Makefile +++ b/common/Makefile @@ -25,7 +25,7 @@ MAKE_JAR = sh $(BASE)/make_jar.sh # TODO: specify source files manually? JAR_BASES = $(TOP) $(BASE) JAR_DIRS = content skin locale modules -JAR_TEXTS = js jsm css dtd xml xul html xhtml xsl +JAR_TEXTS = js jsm css dtd xml xul html xhtml xsl properties JAR_BINS = png CHROME = $(MANGLE)/ diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 68c03316..9005519e 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1130,15 +1130,17 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { }, onClick: function onClick(event) { - let command = event.originalTarget.getAttributeNS(NS, "command"); - if (command && event.button == 0) { - event.preventDefault(); + if (event.originalTarget instanceof Element) { + let command = event.originalTarget.getAttributeNS(NS, "command"); + if (command && event.button == 0) { + event.preventDefault(); - if (dactyl.commands[command]) - dactyl.withSavedValues(["forceNewTab"], function () { - dactyl.forceNewTab = event.ctrlKey || event.shiftKey || event.button == 1; - dactyl.commands[command](event); - }); + if (dactyl.commands[command]) + dactyl.withSavedValues(["forceNewTab"], function () { + dactyl.forceNewTab = event.ctrlKey || event.shiftKey || event.button == 1; + dactyl.commands[command](event); + }); + } } },