ui: Don't show tooltip when ButtonLike is selected (#13857)
This fixes the issue of a tooltip covering the thing that the button has revealed. It also mirrors what other UI frameworks do. Chrome on Linux behaves the same, and Safari does the same thing on macOS. It fixes this:  Release Notes: - N/A
This commit is contained in:
@@ -507,8 +507,10 @@ impl RenderOnce for ButtonLike {
|
||||
})
|
||||
},
|
||||
)
|
||||
.when_some(self.tooltip, |this, tooltip| {
|
||||
this.tooltip(move |cx| tooltip(cx))
|
||||
.when(!self.selected, |this| {
|
||||
this.when_some(self.tooltip, |this, tooltip| {
|
||||
this.tooltip(move |cx| tooltip(cx))
|
||||
})
|
||||
})
|
||||
.children(self.children)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user