-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): temp fix for stuck tooltips
- Loading branch information
1 parent
89272d8
commit 6c0516d
Showing
6 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
invokeai/frontend/web/src/common/util/fixTooltipCloseOnScrollStyles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { CSSProperties } from 'react'; | ||
|
||
/** | ||
* Chakra's Tooltip's method of finding the nearest scroll parent has a problem - it assumes the first parent with | ||
* `overflow: hidden` is the scroll parent. In this case, the Collapse component has that style, but isn't scrollable | ||
* itself. The result is that the tooltip does not close on scroll, because the scrolling happens higher up in the DOM. | ||
* | ||
* As a hacky workaround, we can set the overflow to `visible`, which allows the scroll parent search to continue up to | ||
* the actual scroll parent (in this case, the OverlayScrollbarsComponent in BoardsListWrapper). | ||
* | ||
* See: https://github.com/chakra-ui/chakra-ui/issues/7871#issuecomment-2453780958 | ||
*/ | ||
export const fixTooltipCloseOnScrollStyles: CSSProperties = { | ||
overflow: 'visible', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters