diff --git a/src/htmx.js b/src/htmx.js index 562c06bd..34a9c341 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -1348,7 +1348,7 @@ return (function () { var verb, path; if (elt.tagName === "A") { verb = "get"; - path = elt.href; // DOM property gives the fully resolved href of a relative link + path = getRawAttribute(elt, 'href') } else { var rawAttribute = getRawAttribute(elt, "method"); verb = rawAttribute ? rawAttribute.toLowerCase() : "get"; diff --git a/test/attributes/hx-disinherit.js b/test/attributes/hx-disinherit.js index f069a833..f572a5e4 100644 --- a/test/attributes/hx-disinherit.js +++ b/test/attributes/hx-disinherit.js @@ -101,7 +101,7 @@ describe("hx-disinherit attribute", function() { var link = byId("a1"); link.click(); // should match the fully resolved href of the boosted element - should.equal(request.detail.requestConfig.path, request.detail.elt.href); + should.equal(request.detail.requestConfig.path, '/test'); should.equal(request.detail.elt["htmx-internal-data"].boosted, true); } finally { htmx.off("htmx:beforeRequest", handler);