mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-11-15 02:24:01 +01:00
Use modal dialog for confirming actions (#1168)
* Use modal dialog for confirming actions * cleanup unused state
This commit is contained in:
@@ -93,6 +93,12 @@ document.addEventListener("turbo:load", () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if there is a modal dialog, which should handle its own focus
|
||||
const modal = document.querySelector("[aria-modal='true']");
|
||||
if (modal) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there is an explicit focus target for the next page load
|
||||
for (const target of afterPageLoadFocusTarget) {
|
||||
const element = document.querySelector(target);
|
||||
|
||||
Reference in New Issue
Block a user