mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-08 02:31:36 +02:00
stop refresh when workflow dispatch is being used
This commit is contained in:
parent
5c4265e743
commit
d8af31c8cb
1 changed files with 5 additions and 3 deletions
|
@ -18,12 +18,14 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
// Intent: If the "Actor" or "Status" dropdowns are currently open and being navigated, the htmx refresh would replace
|
||||
// them with closed dropdowns. Instead this prevents the list refresh from occurring while those dropdowns are open.
|
||||
// Intent: If the "Actor" or "Status" dropdowns are currently open and being navigated, or the workflow dispatch
|
||||
// dropdown form is open, the htmx refresh would replace them with closed dropdowns. Instead this prevents the list
|
||||
// refresh from occurring while those dropdowns are open.
|
||||
//
|
||||
// Can't inline this into the `hx-trigger` above because using a left-brace ('[') breaks htmx's trigger parsing.
|
||||
function noActiveDropdowns() {
|
||||
return document.querySelector('[aria-expanded=true]') === null;
|
||||
return document.querySelector('[aria-expanded=true]') === null &&
|
||||
!document.querySelector('#branch-dropdown-form').checkVisibility();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue