mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 22:41:23 +00:00
push url for forms with GET action
fixes https://github.com/bigskysoftware/htmx/issues/485
This commit is contained in:
parent
9a6572f9ee
commit
9c2cda0ee5
@ -926,9 +926,13 @@ return (function () {
|
||||
if (elt.tagName === "A") {
|
||||
verb = "get";
|
||||
path = getRawAttribute(elt, 'href');
|
||||
nodeData.pushURL = true;
|
||||
} else {
|
||||
var rawAttribute = getRawAttribute(elt, "method");
|
||||
verb = rawAttribute ? rawAttribute.toLowerCase() : "get";
|
||||
if (verb === true) {
|
||||
nodeData.pushURL = true;
|
||||
}
|
||||
path = getRawAttribute(elt, 'action');
|
||||
}
|
||||
triggerSpecs.forEach(function(triggerSpec) {
|
||||
@ -1589,7 +1593,7 @@ return (function () {
|
||||
function shouldPush(elt) {
|
||||
var pushUrl = getClosestAttributeValue(elt, "hx-push-url");
|
||||
return (pushUrl && pushUrl !== "false") ||
|
||||
(elt.tagName === "A" && getInternalData(elt).boosted);
|
||||
(getInternalData(elt).boosted && getInternalData(elt).pushURL);
|
||||
}
|
||||
|
||||
function getPushUrl(elt) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user