mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 13:37:40 +00:00
fix(webui): lock user-field height and suppress benign ResizeObserver limit warnings
This commit is contained in:
@@ -66,7 +66,7 @@ const UserField: React.FC<FieldProps<string>> = ({ value, onSave, readOnly }) =>
|
||||
<PopoverTrigger asChild>
|
||||
<div
|
||||
onClick={handleStartEdit}
|
||||
className={`flex items-center justify-between w-full min-h-[28px] px-2 py-1 rounded border border-transparent transition-colors ${
|
||||
className={`flex items-center justify-between w-full h-[28px] px-2 rounded border border-transparent transition-colors ${
|
||||
!readOnly ? 'cursor-pointer hover:bg-accent hover:border-border group' : ''
|
||||
}`}
|
||||
>
|
||||
|
||||
@@ -5,6 +5,18 @@ import ReactDOM from 'react-dom/client'
|
||||
import { ThemeProvider } from './components/theme-provider'
|
||||
import { routeTree } from './routeTree.gen'
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
const resizeObserverErrorNames = [
|
||||
'ResizeObserver loop limit exceeded',
|
||||
'ResizeObserver loop completed with undelivered notifications.',
|
||||
]
|
||||
window.addEventListener('error', (e) => {
|
||||
if (resizeObserverErrorNames.includes(e.message)) {
|
||||
e.stopImmediatePropagation()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
// Set up a Router instance
|
||||
|
||||
Reference in New Issue
Block a user