mirror of
https://github.com/zebrajr/ollama-webui.git
synced 2025-12-05 12:20:26 +01:00
Merge pull request #18260 from silentoplayz/fix-toast-click-issue
fix: allow toast notifications to be closed when a modal is open
This commit is contained in:
commit
7a68f065fa
|
|
@ -57,7 +57,11 @@
|
|||
|
||||
$: if (show && modalElement) {
|
||||
document.body.appendChild(modalElement);
|
||||
focusTrap = FocusTrap.createFocusTrap(modalElement);
|
||||
focusTrap = FocusTrap.createFocusTrap(modalElement, {
|
||||
allowOutsideClick: (e) => {
|
||||
return e.target.closest('[data-sonner-toast]') !== null;
|
||||
}
|
||||
});
|
||||
focusTrap.activate();
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user