mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-03-06 05:59:06 +00:00
manual test for keeping indicators visible
This commit is contained in:
parent
e99d8976f5
commit
df16ed8e96
@ -4585,7 +4585,6 @@ var htmx = (function() {
|
||||
ajaxHelper('get', redirectPath, redirectSwapSpec).then(function() {
|
||||
pushUrlIntoHistory(redirectPath)
|
||||
})
|
||||
responseInfo.keepIndicators = true;
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
1
test/manual/keep-indicators/1.html
Normal file
1
test/manual/keep-indicators/1.html
Normal file
@ -0,0 +1 @@
|
||||
Some Text...
|
||||
29
test/manual/keep-indicators/index.html
Normal file
29
test/manual/keep-indicators/index.html
Normal file
@ -0,0 +1,29 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script type="application/javascript" src="../../../src/htmx.js"></script>
|
||||
<title>History - Index</title>
|
||||
<script>
|
||||
htmx.logAll();
|
||||
htmx.onLoad(function(src){
|
||||
var btn = src.querySelector("button");
|
||||
btn.addEventListener("htmx:beforeOnLoad", function(evt){
|
||||
evt.detail.keepIndicators = true;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:20px;font-family: sans-serif">
|
||||
<h1>Indicator Visibility Test</h1>
|
||||
<p>
|
||||
This test marks the response as <code>keepIndicators</code>, so the indicator span should remain visible after the
|
||||
request finishes.
|
||||
</p>
|
||||
<button hx-get="1.html" hx-indicator="#indicator">
|
||||
Click Me
|
||||
</button>
|
||||
<span id="indicator" class="htmx-indicator">
|
||||
Should Remain Visible...
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user