1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-09 22:35:46 +01:00

Security magic.

This commit is contained in:
Kris Maglione
2011-10-25 17:47:33 -04:00
parent dcad48c23b
commit f3758c1e1d

View File

@@ -859,8 +859,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
events: {
click: function onClick(event) {
if (event.originalTarget instanceof Element) {
let command = event.originalTarget.getAttributeNS(NS, "command");
let elem = event.originalTarget;
if (elem instanceof Element && services.security.isSystemPrincipal(elem.nodePrincipal)) {
let command = elem.getAttributeNS(NS, "command");
if (command && event.button == 0) {
event.preventDefault();