-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari throws a resizeObserver
when sidebar plus content is higher than the viewport
#866
Comments
@av3nger thank you for the report! Can you share a code snippet we can copy and paste into our own apps with steps to reproduce. Be sure to include any Blade variable definitions that are used and use a little code as possible to reproduce the issue, so we can investigate? |
This seems to be triggering the error for me. If I remove more, the error is no longer there:
|
@av3nger thanks! I've been able to replicate the issue with the below code. It seems like if the content of the sidebar and the component combine is larger than the vertical viewport size, the sidebar changing at the Tailwind breakpoint triggers the error. {{ -- layouts/app.blade.php -- }}
<html>
<head>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@fluxStyles()
</head>
<body class="min-h-screen bg-white dark:bg-zinc-800">
<flux:sidebar stashable sticky class="lg:hidden bg-zinc-50 dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-700">
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />
Sidebar
</flux:sidebar>
{{ $slot }}
@fluxScripts()
</body>
</html> And this Volt component <?php
use Livewire\Volt\Component;
new class extends Component {
//
};
?>
<div>
Test
</div> The trick is to make the window really small And then stretch it out horizontally bigger than the Then shrink it back down small again |
resizeObserver
when sidebar plus content is higher than the viewport
Flux version
v1.0.29
Livewire version
v3.5.15
What is the problem?
On Safari, when opening up the browser console and resizing the window, I get the following error in the console: ResizeObserver loop completed with undelivered notifications.
Code snippets
I can't seem to isolate the issue. It's some sort of combination of components. If I start removing components from my page, at some point the issue disappears, but it's not related to any single component. Seems like it's related to the number of components.
For example, if I remove the flux:header and flux:sidebar, the issue disappears. But then if I leave those in and remove the footer and main content - the issue also disappears.
How do you expect it to work?
No browser console error
Please confirm (incomplete submissions will not be addressed)
The text was updated successfully, but these errors were encountered: