Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back button not called when tooltip visible #35

Open
stargazing-dino opened this issue Sep 29, 2021 · 0 comments
Open

Back button not called when tooltip visible #35

stargazing-dino opened this issue Sep 29, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@stargazing-dino
Copy link
Owner

I think this occurs when you use the default AppBar(). This creates a back button that has a maybePop() call when a back it triggered. The maybePop likely sees the overlays and sends a false back.

One workaround I've found is to replace the skrim's default gestureDetector

Widget _createSkrim() {
  return GestureDetector(
    key: skrimKey,
    behavior: HitTestBehavior.translucent,
    onTap: _hideTooltip,
  );
}

with a

Widget _createSkrim() {
  return Listener(
    key: skrimKey,
    behavior: HitTestBehavior.translucent,
    onPointerDown: (_) => _hideTooltip(),
  );
}

But this creates the weird case where when you're dragging, the tooltip is immediately closed because an onPointerDown event was sent.

Listener
https://user-images.githubusercontent.com/29642168/135305144-46ed33e3-49ee-4659-98ac-2f2a879283e0.mp4

GestureDetector
https://user-images.githubusercontent.com/29642168/135305163-17499af7-85cc-4c98-8dac-2e8193eb50bf.mp4

@stargazing-dino stargazing-dino added the enhancement New feature or request label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant