Skip to content

Commit fbde994

Browse files
committed
fix link hijacking issue in simplyview
1 parent 94220be commit fbde994

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

solid/js/vendor/simplyedit/simply.everything.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -556,38 +556,6 @@ properties for a given parent, keep seperate index for this?
556556
}
557557
}
558558

559-
var linkHandler = function(evt) {
560-
if (evt.ctrlKey) {
561-
return;
562-
}
563-
if (evt.which != 1) {
564-
return; // not a 'left' mouse click
565-
}
566-
var link = evt.target;
567-
while (link && link.tagName!='A') {
568-
link = link.parentElement;
569-
}
570-
if (link
571-
&& link.pathname
572-
&& link.hostname==global.location.hostname
573-
&& !link.link
574-
&& !link.dataset.simplyCommand
575-
) {
576-
let path = getPath(link.pathname+link.hash);
577-
if ( !route.has(path) ) {
578-
path = getPath(link.pathname);
579-
}
580-
if ( route.has(path) ) {
581-
let params = runListeners('goto', { path: path});
582-
if (params.path) {
583-
route.goto(params.path);
584-
}
585-
evt.preventDefault();
586-
return false;
587-
}
588-
}
589-
};
590-
591559
var options = {
592560
root: '/'
593561
};
@@ -642,7 +610,6 @@ properties for a given parent, keep seperate index for this?
642610
route.match(getPath(document.location.pathname));
643611
}
644612
});
645-
global.document.addEventListener('click', linkHandler);
646613
},
647614
load: function(routes) {
648615
parseRoutes(routes);

0 commit comments

Comments
 (0)