Skip to content

Commit

Permalink
Add adr for tap event is not simulated in a overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Apr 24, 2023
1 parent 137e5d8 commit daf83f4
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 1. Fix tap event is not simulated in a overlay on Flutter 3.7 for Web/Desktop

Date: 2023-04-24

## Status

Accepted

## Context

Tap events are not being simulated to overlay on the `Web/Desktop` but work fine on mobile devices. This worked fine until the previous release stable 3.3.

## Root causes

Because the thing that the overlay is attached to is a `TextField`, so in order to keep from unfocused the text field when tapping outside of it, you need to tell the overlay widget that it's part of the TextField for purposes of the `tap outside` behavior by adding the `TextFieldTapRegion` around it, so that when the tap arrives, it's considered `inside` of the text field.

## Decision

Try wrapping a `TextFieldTapRegion` around the `Material` in the overlay.

## Consequences

This worked fine

0 comments on commit daf83f4

Please sign in to comment.