mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: disappearing hover effect on popover trigger (#1403)
This commit is contained in:
parent
9c8d00bb61
commit
cd8e4ddf00
@ -96,7 +96,6 @@ class Popover extends StatefulWidget {
|
||||
class PopoverState extends State<Popover> {
|
||||
static final RootOverlayEntry _rootEntry = RootOverlayEntry();
|
||||
final PopoverLink popoverLink = PopoverLink();
|
||||
Timer? _debounceEnterRegionAction;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -175,16 +174,9 @@ class PopoverState extends State<Popover> {
|
||||
|
||||
return MouseRegion(
|
||||
onEnter: (event) {
|
||||
_debounceEnterRegionAction =
|
||||
Timer(const Duration(milliseconds: 200), () {
|
||||
if (widget.triggerActions & PopoverTriggerFlags.hover != 0) {
|
||||
showOverlay();
|
||||
}
|
||||
});
|
||||
},
|
||||
onExit: (event) {
|
||||
_debounceEnterRegionAction?.cancel();
|
||||
_debounceEnterRegionAction = null;
|
||||
if (widget.triggerActions & PopoverTriggerFlags.hover != 0) {
|
||||
showOverlay();
|
||||
}
|
||||
},
|
||||
child: Listener(
|
||||
child: widget.child,
|
||||
|
@ -51,7 +51,7 @@ class _FlowyHoverState extends State<FlowyHover> {
|
||||
return MouseRegion(
|
||||
cursor: widget.cursor != null ? widget.cursor! : SystemMouseCursors.click,
|
||||
opaque: false,
|
||||
onEnter: (p) {
|
||||
onHover: (p) {
|
||||
if (_onHover) return;
|
||||
|
||||
if (widget.buildWhenOnHover?.call() ?? true) {
|
||||
|
Loading…
Reference in New Issue
Block a user