fix(router): Don't capture clicks on links with target attr (#24110)

This commit is contained in:
Corentin Flr 2024-01-04 15:12:45 +01:00 committed by GitHub
parent 3916398f1a
commit 7f9331fc8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,10 @@ $("body").on("click", "a", function (e) {
const href = target_element.getAttribute("href");
const is_on_same_host = target_element.hostname === window.location.hostname;
if (target_element.getAttribute("target") === "_blank") {
return;
}
const override = (route) => {
e.preventDefault();
frappe.set_route(route);