mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): sticky preset image tooltip
There's a bug where preset image tooltips get stuck open in the list. After much fiddling, debugging, and review of upstream dependencies, I have determined that this is bug in Chakra-UI v2. Specifically, it appears to be a race condition related to the Tooltip component's internal use of the `useDisclosure` hook to manage tooltip open state, and the react render cycle. Unfortunately, Chakra v2 is no longer being updated, and it's a pain in the butt to vendor and fix that component given its dependencies. Not 100% sure I could easily fix it, anyways. Fortunately, there is a workaround - reduce the tooltip openDelay to 0ms. I prefer the current 500ms delay but I think it's preferable to have too-quick tooltips than too-sticky tooltips...
This commit is contained in:
committed by
Kent Keirsey
parent
497bc916cc
commit
66e04ea7ab
@@ -9,6 +9,7 @@ const StylePresetImage = ({ presetImageUrl, imageWidth }: { presetImageUrl: stri
|
||||
return (
|
||||
<Tooltip
|
||||
closeOnScroll
|
||||
openDelay={0}
|
||||
label={
|
||||
presetImageUrl && (
|
||||
<Image
|
||||
|
||||
Reference in New Issue
Block a user